|
Voyager ORB | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 |
public java.lang.String getURL()
public long getUniqueId()
public void stop()
public IRequestHandler[] getRequestHandlers()
public boolean handles(java.lang.String requestTag)
public void addRequestHandler(IRequestHandler handler)
|
ObjectSpace Inc. | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |