org.apache.derby.client.net
Class NetAgent

java.lang.Object
  extended by org.apache.derby.client.am.Agent
      extended by org.apache.derby.client.net.NetAgent

public class NetAgent
extends Agent


Field Summary
(package private)  int clientSSLMode_
           
 ConnectionReply connectionReply_
           
 ConnectionRequestInterface connectionRequest_
           
 SqlException exceptionConvertingRdbnam
           
 SqlException exceptionOpeningSocket_
           
(package private)  NetConnection netConnection_
           
 NetConnectionReply netConnectionReply_
           
 NetConnectionRequest netConnectionRequest_
           
 NetPackageReply netPackageReply_
           
 NetPackageRequest netPackageRequest_
           
 NetResultSetReply netResultSetReply_
           
 NetResultSetRequest netResultSetRequest_
           
 NetStatementReply netStatementReply_
           
 NetStatementRequest netStatementRequest_
           
 Typdef originalTargetTypdef_
           
 int orignalTargetSqlam_
           
 ConnectionReply packageReply_
           
 NetConnectionRequest packageRequest_
           
(package private)  int port_
           
(package private)  java.io.InputStream rawSocketInputStream_
           
(package private)  java.io.OutputStream rawSocketOutputStream_
           
protected  Reply reply_
           
protected  Request request_
           
 ResultSetReply resultSetReply_
           
 ResultSetRequestInterface resultSetRequest_
           
(package private)  java.lang.String server_
           
(package private)  java.net.Socket socket_
           
 CcsidManager sourceCcsidManager_
           
 StatementReply statementReply_
           
 StatementRequestInterface statementRequest_
           
protected  int svrcod_
           
 CcsidManager targetCcsidManager_
           
 int targetSqlam_
           
 Typdef targetTypdef_
           
 Typdef typdef_
           
 
Fields inherited from class org.apache.derby.client.am.Agent
accumulatedReadExceptions_, logWriter_, sectionManager_
 
Constructor Summary
NetAgent(NetConnection netConnection, LogWriter logWriter)
           
NetAgent(NetConnection netConnection, LogWriter netLogWriter, int loginTimeout, java.lang.String server, int port, int clientSSLMode)
           
 
Method Summary
protected  void beginReadChain(Statement statement)
           
protected  void beginReadChainOutsideUOW()
           
 void beginWriteChain(Statement statement)
           
 void beginWriteChainOutsideUOW()
           
 void checkForChainBreakingException_()
           
(package private)  void clearSvrcod()
           
 void close_()
           
 java.lang.String convertToStringTcpIpAddress(int tcpIpAddress)
           
 void endReadChain()
           
protected  void endWriteChain()
           
 void flush_()
           
 java.io.InputStream getInputStream()
           
 java.io.OutputStream getOutputStream()
           
protected  int getPort()
           
(package private)  int getSvrcod()
           
protected  int getTimeout()
          Returns the current timeout value that is set on the socket.
protected  void markChainBreakingException_()
           
 LogWriter newLogWriter_(java.io.PrintWriter printWriter, int traceLevel)
           
private  void readDeferredResetConnection()
           
protected  void resetAgent_(LogWriter netLogWriter, int loginTimeout, java.lang.String server, int port)
           
protected  void sendRequest()
           
(package private)  void setInputStream(java.io.InputStream inputStream)
           
(package private)  void setOutputStream(java.io.OutputStream outputStream)
           
(package private)  void setSvrcod(int svrcod)
           
protected  void setTimeout(int timeout)
          Specifies the maximum blocking time that should be used when sending and receiving messages.
 void throwCommunicationsFailure(java.lang.Throwable cause)
           
private  void writeDeferredResetConnection()
           
 
Methods inherited from class org.apache.derby.client.am.Agent
accumulateChainBreakingReadExceptionAndThrow, accumulateDeferredException, accumulateDisconnectException, accumulateReadException, beginBatchedReadChain, beginBatchedWriteChain, checkForExceptions, close, disconnectEvent, endBatchedReadChain, endBatchedWriteChain, flow, flowBatch, flowOutsideUOW, getLogWriter, loggingEnabled, resetAgent, resetAgent, setBatchedExceptionLabelIndex, setLogWriter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

connectionRequest_

public ConnectionRequestInterface connectionRequest_

packageRequest_

public NetConnectionRequest packageRequest_

statementRequest_

public StatementRequestInterface statementRequest_

resultSetRequest_

public ResultSetRequestInterface resultSetRequest_

connectionReply_

public ConnectionReply connectionReply_

packageReply_

public ConnectionReply packageReply_

statementReply_

public StatementReply statementReply_

resultSetReply_

public ResultSetReply resultSetReply_

netConnection_

NetConnection netConnection_

request_

protected Request request_

netConnectionRequest_

public NetConnectionRequest netConnectionRequest_

netPackageRequest_

public NetPackageRequest netPackageRequest_

netStatementRequest_

public NetStatementRequest netStatementRequest_

netResultSetRequest_

public NetResultSetRequest netResultSetRequest_

reply_

protected Reply reply_

netConnectionReply_

public NetConnectionReply netConnectionReply_

netPackageReply_

public NetPackageReply netPackageReply_

netStatementReply_

public NetStatementReply netStatementReply_

netResultSetReply_

public NetResultSetReply netResultSetReply_

socket_

java.net.Socket socket_

rawSocketInputStream_

java.io.InputStream rawSocketInputStream_

rawSocketOutputStream_

java.io.OutputStream rawSocketOutputStream_

server_

java.lang.String server_

port_

int port_

clientSSLMode_

int clientSSLMode_

sourceCcsidManager_

public CcsidManager sourceCcsidManager_

targetCcsidManager_

public CcsidManager targetCcsidManager_

typdef_

public Typdef typdef_

targetTypdef_

public Typdef targetTypdef_

originalTargetTypdef_

public Typdef originalTargetTypdef_

svrcod_

protected int svrcod_

orignalTargetSqlam_

public int orignalTargetSqlam_

targetSqlam_

public int targetSqlam_

exceptionOpeningSocket_

public SqlException exceptionOpeningSocket_

exceptionConvertingRdbnam

public SqlException exceptionConvertingRdbnam
Constructor Detail

NetAgent

public NetAgent(NetConnection netConnection,
                LogWriter logWriter)
         throws SqlException
Throws:
SqlException

NetAgent

NetAgent(NetConnection netConnection,
         LogWriter netLogWriter,
         int loginTimeout,
         java.lang.String server,
         int port,
         int clientSSLMode)
   throws SqlException
Throws:
SqlException
Method Detail

resetAgent_

protected void resetAgent_(LogWriter netLogWriter,
                           int loginTimeout,
                           java.lang.String server,
                           int port)
                    throws SqlException
Specified by:
resetAgent_ in class Agent
Throws:
SqlException

setSvrcod

void setSvrcod(int svrcod)

clearSvrcod

void clearSvrcod()

getSvrcod

int getSvrcod()

flush_

public void flush_()
            throws DisconnectException
Specified by:
flush_ in class Agent
Throws:
DisconnectException

close_

public void close_()
            throws SqlException
Specified by:
close_ in class Agent
Throws:
SqlException

setTimeout

protected void setTimeout(int timeout)
Specifies the maximum blocking time that should be used when sending and receiving messages. The timeout is implemented by using the the underlying socket implementation's timeout support. Note that the support for timeout on sockets is dependent on the OS implementation. For the same reason we ignore any exceptions thrown by the call to the socket layer.

Parameters:
timeout - The timeout value in seconds. A value of 0 corresponds to infinite timeout.

getTimeout

protected int getTimeout()
Returns the current timeout value that is set on the socket. Note that the support for timeout on sockets is dependent on the OS implementation. For the same reason we ignore any exceptions thrown by the call to the socket layer.

Returns:
The timeout value in seconds. A value of 0 corresponds to that no timeout is specified on the socket.

sendRequest

protected void sendRequest()
                    throws DisconnectException
Throws:
DisconnectException

getInputStream

public java.io.InputStream getInputStream()

getOutputStream

public java.io.OutputStream getOutputStream()

setInputStream

void setInputStream(java.io.InputStream inputStream)

setOutputStream

void setOutputStream(java.io.OutputStream outputStream)

throwCommunicationsFailure

public void throwCommunicationsFailure(java.lang.Throwable cause)
                                throws DisconnectException
Throws:
DisconnectException

newLogWriter_

public LogWriter newLogWriter_(java.io.PrintWriter printWriter,
                               int traceLevel)
Specified by:
newLogWriter_ in class Agent

markChainBreakingException_

protected void markChainBreakingException_()
Specified by:
markChainBreakingException_ in class Agent

checkForChainBreakingException_

public void checkForChainBreakingException_()
                                     throws SqlException
Specified by:
checkForChainBreakingException_ in class Agent
Throws:
SqlException

writeDeferredResetConnection

private void writeDeferredResetConnection()
                                   throws SqlException
Throws:
SqlException

beginWriteChainOutsideUOW

public void beginWriteChainOutsideUOW()
                               throws SqlException
Overrides:
beginWriteChainOutsideUOW in class Agent
Throws:
SqlException

beginWriteChain

public void beginWriteChain(Statement statement)
                     throws SqlException
Overrides:
beginWriteChain in class Agent
Throws:
SqlException

endWriteChain

protected void endWriteChain()
Overrides:
endWriteChain in class Agent

readDeferredResetConnection

private void readDeferredResetConnection()
                                  throws SqlException
Throws:
SqlException

beginReadChain

protected void beginReadChain(Statement statement)
                       throws SqlException
Overrides:
beginReadChain in class Agent
Throws:
SqlException

beginReadChainOutsideUOW

protected void beginReadChainOutsideUOW()
                                 throws SqlException
Overrides:
beginReadChainOutsideUOW in class Agent
Throws:
SqlException

endReadChain

public void endReadChain()
                  throws SqlException
Overrides:
endReadChain in class Agent
Throws:
SqlException

convertToStringTcpIpAddress

public java.lang.String convertToStringTcpIpAddress(int tcpIpAddress)

getPort

protected int getPort()

Built on Thu 2012-03-29 21:53:33+0000, from revision ???

Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.