com.pivotal.gemfirexd.internal.client.net

## Class NetAgent

- java.lang.Object
- - com.pivotal.gemfirexd.internal.client.am.Agent
  - - com.pivotal.gemfirexd.internal.client.net.NetAgent

    public class NetAgent
    extends Agent

### Field Summary

Fields
`ConnectionReply` `connectionReply_`
`ConnectionRequestInterface` `connectionRequest_`
`SqlException` `exceptionOpeningSocket_`
`NetConnectionReply` `netConnectionReply_`
`NetConnectionRequest` `netConnectionRequest_`
`NetPackageReply` `netPackageReply_`
`NetPackageRequest` `netPackageRequest_`
`NetResultSetReply` `netResultSetReply_`
`NetResultSetRequest` `netResultSetRequest_`
`NetStatementReply` `netStatementReply_`
`NetStatementRequest` `netStatementRequest_`
`Typdef` `originalTargetTypdef_`
`int` `orignalTargetSqlam_`
`ConnectionReply` `packageReply_`
`NetConnectionRequest` `packageRequest_`
`protected Reply` `reply_`
`protected Request` `request_`
`ResultSetReply` `resultSetReply_`
`ResultSetRequestInterface` `resultSetRequest_`
`CcsidManager` `sourceCcsidManager_`
`StatementReply` `statementReply_`
`StatementRequestInterface` `statementRequest_`
`protected int` `svrcod_`
`CcsidManager` `targetCcsidManager_`
`int` `targetSqlam_`
`Typdef` `targetTypdef_`
`Typdef` `typdef_`

### Fields inherited from class com.pivotal.gemfirexd.internal.client.am.Agent

`accumulatedReadExceptions_, disableDisconnectEvent_, forSqlException_, logWriter_, sectionManager_`

### Constructor Summary

Constructors
Constructor and Description
`NetAgent(NetConnection netConnection, LogWriter logWriter)`

### Method Summary

Methods
`protected void` `beginReadChain(Statement statement)`
`protected void` `beginReadChainOutsideUOW()`
`void` `beginWriteChain(Statement statement)`
`void` `beginWriteChainOutsideUOW()`
`void` `checkForChainBreakingException_()`
`protected void` `checkOpen()`
`void` `close_()`
`String` `convertToStringTcpIpAddress(int tcpIpAddress)`
`void` `endReadChain()`
`protected void` `endWriteChain()`
`void` `flush_()`
`InputStream` `getInputStream()`
`OutputStream` `getOutputStream()`
`int` `getPort()`
`String` `getServer()`
`String` `getServerLocation()`
`protected int` `getTimeout()` Returns the current timeout value that is set on the socket.
`protected void` `markChainBreakingException_()`
`LogWriter` `newLogWriter_(PrintWriter printWriter, int traceLevel)`
`boolean` `reconnectAgent(LogWriter logWriter, int loginTimeout, String server, int port)`
`protected void` `resetAgent_(LogWriter netLogWriter, int loginTimeout, String server, int port)`
`protected void` `sendRequest()`
`protected void` `setTimeout(int timeout)` Specifies the maximum blocking time that should be used when sending and receiving messages.
`void` `throwCommunicationsFailure(Throwable cause)`
`String` `toString()`

### Methods inherited from class com.pivotal.gemfirexd.internal.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, 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_

#### 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_

#### 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_

### Constructor Detail

#### NetAgent

    public NetAgent(NetConnection netConnection,
            LogWriter logWriter)
             throws SqlException

Throws:
  `SqlException`

### Method Detail

#### resetAgent_

    protected void resetAgent_(LogWriter netLogWriter,
                   int loginTimeout,
                   String server,
                   int port)
                        throws SqlException

Specified by:
  `resetAgent_` in class `Agent`
Throws:
  `SqlException`

#### reconnectAgent

    public boolean reconnectAgent(LogWriter logWriter,
                         int loginTimeout,
                         String server,
                         int port)
                           throws SqlException

Throws:
  `SqlException`

#### 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 InputStream getInputStream()

#### getOutputStream

    public OutputStream getOutputStream()

#### throwCommunicationsFailure

    public void throwCommunicationsFailure(Throwable cause)
                                    throws DisconnectException

Throws:
  `DisconnectException`

#### newLogWriter_

    public LogWriter newLogWriter_(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`

#### 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`

#### 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 String convertToStringTcpIpAddress(int tcpIpAddress)

#### getPort

    public int getPort()

Specified by:
  `getPort` in class `Agent`

#### getServer

    public String getServer()

Specified by:
  `getServer` in class `Agent`

#### getServerLocation

    public final String getServerLocation()

Specified by:
  `getServerLocation` in class `Agent`

#### checkOpen

    protected void checkOpen()
                      throws DisconnectException

Throws:
  `DisconnectException`

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`