|
Voyager ORB | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The ITransportConnection interface can be implemented in conjuction with the ITransportServer interface to allow a Voyager server to accept and initiate network communications over a specific transport protocol, such as tcp or udp.
Method Summary | |
boolean |
allowsConcurrentUse()
Tests to see if this connection instance allows concurrent use. |
void |
becomeServer()
Forces this connection to spawn a thread and begin processing incoming requests. Typically an ITransportServer implementation will accept an incoming socket/connection and construct an instance of an ITransportConnection to manage it. |
void |
close()
Closes this connection. |
ITransportConnection |
duplicate()
Returns a new connection instance connected to the same remote host as this instance. |
java.lang.String |
getLocalXURL()
Returns a String representing the local host address. |
ITransportServer |
getServer()
Returns the ITransportServer that created this connection. |
java.lang.String |
getURL()
Returns a String representing the remote host the connection is bound to. |
boolean |
isLocked()
Tests if this connection instance is locked by another thread without blocking. |
boolean |
isOpen()
Tests if this connection instance is still 'connected' to a remote host. |
boolean |
isServer()
Tests if this connection instance has become a server and is processing incoming messages. |
ITransportConnection |
lock()
Allows the calling object to acquire a lock on this connection. |
java.io.InputStream |
lockInput()
Allows the calling object to acquire a lock on the InputStream before returning it. |
java.io.OutputStream |
lockOutput()
Allows the calling object to acquire a lock on the OutputStream before returning it. |
void |
release()
Allows the calling object to release a previously acquired lock on this connection. |
void |
releaseInput()
Allows the calling object to release its lock on the InputStream given by this connection instance. |
void |
releaseInputTo(java.lang.Thread thread)
Allows the calling object to transfer its lock to the given thread. |
void |
releaseOutput()
Allows the calling object to release its lock on the OutputStream given by this connection instance. |
void |
releaseOutputTo(java.lang.Thread thread)
Allows the calling object to transfer its lock to the given thread. |
void |
reset()
Allows for the connection to be reinitialized. |
void |
setConcurrentUse(boolean allow)
Notifies this connection that it will be shared among multiple references. |
Method Detail |
public java.lang.String getLocalXURL()
public java.lang.String getURL()
public ITransportServer getServer()
public void setConcurrentUse(boolean allow)
public ITransportConnection lock() throws java.io.IOException
public void release()
public java.io.OutputStream lockOutput() throws java.io.IOException
public void releaseInput()
public void releaseInputTo(java.lang.Thread thread)
public java.io.InputStream lockInput() throws java.io.IOException
public void releaseOutput()
public void releaseOutputTo(java.lang.Thread thread)
public void close()
public void reset()
public ITransportConnection duplicate() throws java.io.IOException
public void becomeServer()
public boolean isLocked()
public boolean isOpen()
public boolean isServer()
public boolean allowsConcurrentUse()
|
ObjectSpace Inc. | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |