Voyager ORB

com.objectspace.voyager.transport
Interface ITransportServer


public abstract interface ITransportServer

The ITransportServer interface can be implemented in conjuction with an ITransportConnection interface to allow a Voyager server to accept and initiate network communications over a specific transport protocol, such as tcp or udp.
As soon as this server instance is constructed, it should begin listening for new connections. For example, a TcpServer (an implementation that supports the tcp protocol) would start a ServerSocket listening on the port the TcpTransport (ITransport implementation) constructed it for. As new sockets are returned by the ServerSocket.listen() method, new TcpConnections should be constructed to manage the socket lifecycle and handle the incoming and outgoing data stream.


Method Summary
 void addRequestHandler(IRequestHandler handler)
          Adds a new IRequestHandler implementation instance to be used by this server instance.
 IRequestHandler[] getRequestHandlers()
          Returns the request handlers associated with this protocol.
 long getUniqueId()
          A long value that uniquely identifies this server instance.
 java.lang.String getURL()
          Returns a String representation of the address this server is accepting incoming data on.
 boolean handles(java.lang.String requestTag)
          Tests to see if this server instance can handle the given protocol.
 void stop()
          Requests that this server instance stop accepting incoming connections.
 

Method Detail

getURL

public java.lang.String getURL()
Returns a String representation of the address this server is accepting incoming data on.

getUniqueId

public long getUniqueId()
A long value that uniquely identifies this server instance. Can be simply based on the address this server is listening on.

stop

public void stop()
Requests that this server instance stop accepting incoming connections.

getRequestHandlers

public IRequestHandler[] getRequestHandlers()
Returns the request handlers associated with this protocol.

handles

public boolean handles(java.lang.String requestTag)
Tests to see if this server instance can handle the given protocol.

addRequestHandler

public void addRequestHandler(IRequestHandler handler)
Adds a new IRequestHandler implementation instance to be used by this server instance.

ObjectSpace Inc.

(c) Copyright 1997-1999 ObjectSpace, Inc.
14850 Quorum Drive, Suite 500
Dallas, Texas 75240