org.teiid.transport
Class PgBackendProtocol

java.lang.Object
  extended by org.teiid.transport.PgBackendProtocol
All Implemented Interfaces:
org.jboss.netty.channel.ChannelDownstreamHandler, org.jboss.netty.channel.ChannelHandler, ODBCClientRemote

public class PgBackendProtocol
extends java.lang.Object
implements org.jboss.netty.channel.ChannelDownstreamHandler, ODBCClientRemote

Represents the messages going from Server --> PG ODBC Client Some parts of this code is taken from H2's implementation of ODBC


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler
org.jboss.netty.channel.ChannelHandler.Sharable
 
Constructor Summary
PgBackendProtocol()
           
 
Method Summary
 void authenticationSucess(int processId, int screctKey)
           
 void bindComplete()
           
 void emptyQueryReceived()
           
 void errorOccurred(java.lang.String msg)
           
 void errorOccurred(java.lang.Throwable t)
           
 void flush()
           
 void handleDownstream(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.ChannelEvent evt)
           
 void initialized(java.util.Properties props)
           
 void prepareCompleted(java.lang.String preparedName)
           
 void ready(boolean inTransaction, boolean failedTransaction)
           
 void sendParameterDescription(java.sql.ParameterMetaData meta, int[] paramType)
           
 void sendResults(java.lang.String sql, java.sql.ResultSet rs, boolean describeRows)
           
 void sendResultSetDescription(java.sql.ResultSetMetaData metaData)
           
 void sendUpdateCount(java.lang.String sql, int updateCount)
           
 void setEncoding(java.nio.charset.Charset value)
           
 void statementClosed()
           
 void terminated()
           
 void useClearTextAuthentication()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PgBackendProtocol

public PgBackendProtocol()
Method Detail

handleDownstream

public void handleDownstream(org.jboss.netty.channel.ChannelHandlerContext ctx,
                             org.jboss.netty.channel.ChannelEvent evt)
                      throws java.lang.Exception
Specified by:
handleDownstream in interface org.jboss.netty.channel.ChannelDownstreamHandler
Throws:
java.lang.Exception

initialized

public void initialized(java.util.Properties props)
Specified by:
initialized in interface ODBCClientRemote

useClearTextAuthentication

public void useClearTextAuthentication()
Specified by:
useClearTextAuthentication in interface ODBCClientRemote

authenticationSucess

public void authenticationSucess(int processId,
                                 int screctKey)
Specified by:
authenticationSucess in interface ODBCClientRemote

prepareCompleted

public void prepareCompleted(java.lang.String preparedName)
Specified by:
prepareCompleted in interface ODBCClientRemote

bindComplete

public void bindComplete()
Specified by:
bindComplete in interface ODBCClientRemote

errorOccurred

public void errorOccurred(java.lang.String msg)
Specified by:
errorOccurred in interface ODBCClientRemote

errorOccurred

public void errorOccurred(java.lang.Throwable t)
Specified by:
errorOccurred in interface ODBCClientRemote

ready

public void ready(boolean inTransaction,
                  boolean failedTransaction)
Specified by:
ready in interface ODBCClientRemote

setEncoding

public void setEncoding(java.nio.charset.Charset value)
Specified by:
setEncoding in interface ODBCClientRemote

sendParameterDescription

public void sendParameterDescription(java.sql.ParameterMetaData meta,
                                     int[] paramType)
Specified by:
sendParameterDescription in interface ODBCClientRemote

sendResultSetDescription

public void sendResultSetDescription(java.sql.ResultSetMetaData metaData)
Specified by:
sendResultSetDescription in interface ODBCClientRemote

sendResults

public void sendResults(java.lang.String sql,
                        java.sql.ResultSet rs,
                        boolean describeRows)
Specified by:
sendResults in interface ODBCClientRemote

sendUpdateCount

public void sendUpdateCount(java.lang.String sql,
                            int updateCount)
Specified by:
sendUpdateCount in interface ODBCClientRemote

statementClosed

public void statementClosed()
Specified by:
statementClosed in interface ODBCClientRemote

terminated

public void terminated()
Specified by:
terminated in interface ODBCClientRemote

flush

public void flush()
Specified by:
flush in interface ODBCClientRemote

emptyQueryReceived

public void emptyQueryReceived()
Specified by:
emptyQueryReceived in interface ODBCClientRemote


Copyright © 2010. All Rights Reserved.