com.ericsson.otp.erlang
Class OtpLocalNode
java.lang.Object
|
+--com.ericsson.otp.erlang.AbstractNode
|
+--com.ericsson.otp.erlang.OtpLocalNode
- Direct Known Subclasses:
- OtpNode, OtpSelf
- public class OtpLocalNode
- extends AbstractNode
This class represents local node types. It is used to group the
node types OtpNode
and OtpSelf
.
Field Summary |
protected java.net.Socket |
epmd
|
protected int |
port
|
Constructor Summary |
protected |
OtpLocalNode()
|
protected |
OtpLocalNode(java.lang.String node)
Create a node with the given name and the default cookie. |
protected |
OtpLocalNode(java.lang.String node,
java.lang.String cookie)
Create a node with the given name and cookie. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
port
protected int port
epmd
protected java.net.Socket epmd
OtpLocalNode
protected OtpLocalNode()
OtpLocalNode
protected OtpLocalNode(java.lang.String node)
- Create a node with the given name and the default cookie.
OtpLocalNode
protected OtpLocalNode(java.lang.String node,
java.lang.String cookie)
- Create a node with the given name and cookie.
port
public int port()
- Get the port number used by this node.
- Returns:
- the port number this server node is accepting
connections on.
setEpmd
protected void setEpmd(java.net.Socket s)
- Set the Epmd socket after publishing this nodes listen port to
Epmd.
- Parameters:
s
- The socket connecting this node to Epmd.
getEpmd
protected java.net.Socket getEpmd()
- Get the Epmd socket.
- Returns:
- The socket connecting this node to Epmd.
createPid
public OtpErlangPid createPid()
- Create an Erlang
pid
. Erlang pids are based
upon some node specific information; this method creates a pid
using the information in this node. Each call to this method
produces a unique pid.
- Returns:
- an Erlang pid.
createPort
public OtpErlangPort createPort()
- Create an Erlang
port
. Erlang ports are
based upon some node specific information; this method creates a
port using the information in this node. Each call to this method
produces a unique port. It may not be meaningful to create a port
in a non-Erlang environment, but this method is provided for
completeness.
- Returns:
- an Erlang port.
createRef
public OtpErlangRef createRef()
- Create an Erlang
reference
. Erlang
references are based upon some node specific information; this
method creates a reference using the information in this node.
Each call to this method produces a unique reference.
- Returns:
- an Erlang reference.