| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.adventnet.management.transport.TcpSessionTransportImpl
Implementation of the SessionTransportProvider interface that provides the session communiation with TCP/IP as the lower layer transport. This class implements all the IO operations (open, close, read, write) required by the session communication.
| Fields inherited from interface com.adventnet.management.transport.SessionTransportProvider | 
ERROR, OK | 
| Constructor Summary | |
TcpSessionTransportImpl(java.net.Socket sock)
Constructor for this class that takes a TCP Socket instance as an argument.  | 
|
| Method Summary | |
 int | 
close()
Closes the transport interface after communication is over.  | 
 java.net.InetAddress | 
getAddress()
Returns the socket address of the TCP socket.  | 
 java.lang.String | 
getHostName()
Returns the hostname of the TCP socket.  | 
 int | 
getPort()
Returns the port of the TCP socket.  | 
 int | 
open(java.lang.String[] params)
Opens the session over which the data is sent/received Note: Presently this is not intended to be called by the API user since the TcpClientTransportImpl internally creates the session object.  | 
 byte[] | 
read()
Receive data from the peer over the transport interface.  | 
 int | 
write(byte[] buf,
      int len)
Send data to the server over the TCP server socket interface.  | 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
public TcpSessionTransportImpl(java.net.Socket sock)
| Method Detail | 
public int open(java.lang.String[] params)
         throws TransportException
open in interface SessionTransportProviderparams - parameters required for opening the session interface.TransportException - in case of an error during opening the
 transport interface.
public int write(byte[] buf,
                 int len)
          throws TransportException
write in interface SessionTransportProviderbuf - Buffer that contains the bytes to be sent.len - number of bytes to sendTransportException - in case of an error during send.
public byte[] read()
            throws TransportException
read in interface SessionTransportProviderTransportException - in case of an error during receive.
public int close()
          throws TransportException
close in interface SessionTransportProviderTransportException - in case of an error during closing.public int getPort()
public java.net.InetAddress getAddress()
public java.lang.String getHostName()
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||