public class OtpCookedConnection extends AbstractConnection
Maintains a connection between a Java process and a remote Erlang, Java or C node. The object maintains connection state and allows data to be sent to and received from the peer.
Once a connection is established between the local node and a remote node, the connection object can be used to send and receive messages between the nodes.
The various receive methods are all blocking and will return only when a valid message has been received or an exception is raised.
If an exception occurs in any of the methods in this class, the connection will be closed and must be reopened in order to resume communication with the peer.
The message delivery methods in this class deliver directly to
mailboxes
in the OtpNode
class.
It is not possible to create an instance of this class directly. OtpCookedConnection objects are created as needed by the underlying mailbox mechanism.
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the connection to the remote node.
|
void |
deliver(java.lang.Exception e)
Deliver communication exceptions to the recipient.
|
void |
deliver(OtpMsg msg)
Deliver messages to the recipient.
|
getFlags, getTraceLevel, isConnected, run, setFlags, setTraceLevel
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public void close()
AbstractConnection
close
in class AbstractConnection
public void deliver(java.lang.Exception e)
AbstractConnection
deliver
in class AbstractConnection
public void deliver(OtpMsg msg)
AbstractConnection
deliver
in class AbstractConnection