|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.iids.aos.kernel.mux.BaseConnection
public class BaseConnection
A base connection between this and another multiplexer. Performs several functions. A base connection encapsulates the underlying socket that carries the communication. Any number of virtual connections may be multiplexed on top of a base connection. As per the protocol spec, all messages related to a particular virtual connection (and therefore a connection port) must be carried by the same base connection. Also as per the protocol spec, a virtual connection will not try to replace a closed base connection with another one. Instead, such a virtual connection is closed. For this purpose, a base connection keeps a set of 'dependent connection ports'. A dependent connection port is a connection port whose communication is carried by the base connection. This way, when the base connection is closed, we can determine which connection ports are affected. Thread-safe.
| Constructor Summary | |
|---|---|
BaseConnection(java.net.Socket socket)
Special case: used by ACTP to send MUXP_OPEN_ERROR_USE_SEPARATE_BASECONN |
|
| Method Summary | |
|---|---|
void |
close()
Performs the actions that must occur to fully close the base connection and remove any associated state. |
void |
close(java.io.IOException e)
|
KernelException |
getExceptionThatCausedClose()
|
java.net.Socket |
getSocket()
Returns the underlying socket. |
boolean |
inUse()
When errors occur on a base connection we call this method to see if it affected any MUXP connections. |
boolean |
isClosed()
Returns true iff close() has been called. |
java.lang.String |
localName()
Returns a human-readable string for the local communication endpoint. |
java.lang.String |
remoteName()
Returns some human-readable string for the remote multiplexer. |
void |
setExceptionThatCausedClose(KernelException e)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BaseConnection(java.net.Socket socket)
| Method Detail |
|---|
public java.net.Socket getSocket()
public void close()
public void close(java.io.IOException e)
public boolean inUse()
public boolean isClosed()
public void setExceptionThatCausedClose(KernelException e)
public KernelException getExceptionThatCausedClose()
public java.lang.String localName()
public java.lang.String remoteName()
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||