com.adventnet.management.transport
Class TcpServerTransportImpl

java.lang.Object
  |
  +--com.adventnet.management.transport.TcpServerTransportImpl
All Implemented Interfaces:
TransportProvider

public class TcpServerTransportImpl
extends java.lang.Object
implements TransportProvider

Server side implementation of the TransportProvider interface that provides TCP as the lower layer transport. This class creates the ServerSocket that listens for incoming client requests and creates a session for each client request.


Constructor Summary
TcpServerTransportImpl()
          Default constructor that creates an instance of this class.
 
Method Summary
 void close()
          Closes the transport interface after communication is over.
 void init(java.lang.Object[] params)
          Initializes the TCP ServerSocket over which the data is sent/received.
 SessionTransportProvider open(java.lang.String[] params)
          Creates a session for communicating with each of the clients and returns a handle (session instance) to the connection request received from the client.
 void setLogInterface(LogInterface logInterface)
          Sets the LogInterface object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TcpServerTransportImpl

public TcpServerTransportImpl()
Default constructor that creates an instance of this class.
Method Detail

init

public void init(java.lang.Object[] params)
          throws TransportException
Initializes the TCP ServerSocket over which the data is sent/received.
Specified by:
init in interface TransportProvider
Throws:
TransportException - is thrown in case of an error during initializing the transport interface.

open

public SessionTransportProvider open(java.lang.String[] params)
                              throws TransportException
Creates a session for communicating with each of the clients and returns a handle (session instance) to the connection request received from the client.
Specified by:
open in interface TransportProvider
Parameters:
params - Parameters that are required to create the session.
Returns:
a SessionTransportProvider that represents a session for communication with each of the clients.
Throws:
TransportException - is thrown in case of an error during opening the transport interface.

close

public void close()
           throws TransportException
Closes the transport interface after communication is over.
Specified by:
close in interface TransportProvider
Throws:
TransportException - is thrown in case of an error during closing.

setLogInterface

public void setLogInterface(LogInterface logInterface)
Sets the LogInterface object.
Specified by:
setLogInterface in interface TransportProvider


Copyright (c)AdventNet Inc., 1996-2004