OtpSelf
.@Deprecated public class OtpServer extends OtpSelf
OtpSelf.publishPort().
When the Java node will be connecting to a remote Erlang, Java or C node, it must first identify itself as a node by creating an instance of this class, after which it may connect to the remote node.
Setting up a connection may be done as follows:
OtpServer self = new OtpServer("server", "cookie"); // identify self
self.publishPort(); // make port information available
OtpConnection conn = self.accept(); // get incoming connection
OtpSelfepmd, port| Constructor and Description |
|---|
OtpServer(OtpSelf self)
Deprecated.
|
OtpServer(java.lang.String node,
java.lang.String cookie)
Deprecated.
Create an OtpServer, using a vacant port chosen by the operating system.
|
OtpServer(java.lang.String node,
java.lang.String cookie,
int port)
Deprecated.
Create an OtpServer, using the specified port number.
|
accept, connect, pid, publishPort, unPublishPortcreatePid, createPort, createRef, getEpmd, port, setEpmdalive, cookie, createServerTransport, createTransport, createTransport, host, node, setCookie, toStringpublic OtpServer(OtpSelf self) throws java.io.IOException
self - an existing self node.java.io.IOException - if a ServerSocket could not be created.public OtpServer(java.lang.String node,
java.lang.String cookie)
throws java.io.IOException
OtpLocalNode.port()
method.node - the name of the node.cookie - the authorization cookie that will be used by this node when
accepts connections from remote nodes.java.io.IOException - if a ServerSocket could not be created.public OtpServer(java.lang.String node,
java.lang.String cookie,
int port)
throws java.io.IOException
node - a name for this node, as above.cookie - the authorization cookie that will be used by this node when
accepts connections from remote nodes.port - the port number to bind the socket to.java.io.IOException - if a ServerSocket could not be created or if the chosen
port number was not available.