public class OtpErlangPort extends OtpErlangObject
OtpErlangObject.HashhashCodeValue| Constructor and Description |
|---|
OtpErlangPort(int tag,
java.lang.String node,
int id,
int creation)
Create an Erlang port from its components.
|
OtpErlangPort(OtpInputStream buf)
Create an Erlang port from a stream containing a port encoded in Erlang
external format.
|
OtpErlangPort(java.lang.String node,
int id,
int creation)
Create an Erlang port from its components.
|
| Modifier and Type | Method and Description |
|---|---|
int |
creation()
Get the creation number from the port.
|
protected int |
doHashCode() |
void |
encode(OtpOutputStream buf)
Convert this port to the equivalent Erlang external representation.
|
boolean |
equals(java.lang.Object o)
Determine if two ports are equal.
|
int |
id()
Get the id number from the port.
|
java.lang.String |
node()
Get the node name from the port.
|
protected int |
tag() |
java.lang.String |
toString()
Get the string representation of the port.
|
public OtpErlangPort(OtpInputStream buf) throws OtpErlangDecodeException
buf - the stream containing the encoded port.OtpErlangDecodeException - if the buffer does not contain a valid external
representation of an Erlang port.public OtpErlangPort(java.lang.String node,
int id,
int creation)
node - the nodename.id - an arbitrary number. Only the low order 28 bits will be used.creation - another arbitrary number. Only the low order 2 bits will be used.public OtpErlangPort(int tag,
java.lang.String node,
int id,
int creation)
tag - the external format to be compliant with.
OtpExternal.portTag where only a subset of the bits are used (see other constructor)
OtpExternal.newPortTag where all 32 bits of id and creation are significant.
newPortTag can only be decoded by OTP-19 and newer.node - the nodename.id - an arbitrary number. Only the low order 28 bits will be used.creation - another arbitrary number.protected int tag()
public int id()
public int creation()
public java.lang.String node()
public java.lang.String toString()
toString in class OtpErlangObjectpublic void encode(OtpOutputStream buf)
encode in class OtpErlangObjectbuf - an output stream to which the encoded port should be written.public boolean equals(java.lang.Object o)
equals in class OtpErlangObjecto - the other port to compare to.protected int doHashCode()
doHashCode in class OtpErlangObject