|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ericsson.otp.erlang.OtpErlangObject com.ericsson.otp.erlang.OtpErlangPid
public class OtpErlangPid
Provides a Java representation of Erlang PIDs. PIDs represent Erlang processes and consist of a nodename and a number of integers.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.ericsson.otp.erlang.OtpErlangObject |
---|
OtpErlangObject.Hash |
Field Summary |
---|
Fields inherited from class com.ericsson.otp.erlang.OtpErlangObject |
---|
hashCodeValue |
Constructor Summary | |
---|---|
protected |
OtpErlangPid(int tag,
java.lang.String node,
int id,
int serial,
int creation)
Create an Erlang pid from its components. |
|
OtpErlangPid(OtpInputStream buf)
Create an Erlang PID from a stream containing a PID encoded in Erlang external format. |
|
OtpErlangPid(OtpLocalNode self)
Deprecated. use OtpLocalNode:createPid() instead |
|
OtpErlangPid(java.lang.String node,
int id,
int serial,
int creation)
Create an Erlang pid from its components. |
Method Summary | |
---|---|
int |
compareTo(java.lang.Object o)
|
int |
creation()
Get the creation number from the PID. |
protected int |
doHashCode()
|
void |
encode(OtpOutputStream buf)
Convert this PID to the equivalent Erlang external representation. |
boolean |
equals(java.lang.Object o)
Determine if two PIDs are equal. |
int |
id()
Get the id number from the PID. |
java.lang.String |
node()
Get the node name from the PID. |
int |
serial()
Get the serial number from the PID. |
protected int |
tag()
|
java.lang.String |
toString()
Get the string representation of the PID. |
Methods inherited from class com.ericsson.otp.erlang.OtpErlangObject |
---|
bind, clone, decode, hashCode, match |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
@Deprecated public OtpErlangPid(OtpLocalNode self)
self
- the local node.public OtpErlangPid(OtpInputStream buf) throws OtpErlangDecodeException
buf
- the stream containing the encoded PID.
OtpErlangDecodeException
- if the buffer does not contain a valid external
representation of an Erlang PID.public OtpErlangPid(java.lang.String node, int id, int serial, int creation)
node
- the nodename.id
- an arbitrary number. Only the low order 15 bits will be used.serial
- another arbitrary number. Only the low order 13 bits will be
used.creation
- yet another arbitrary number. Ony the low order 2 bits will
be used.protected OtpErlangPid(int tag, java.lang.String node, int id, int serial, int creation)
tag
- the external format to be compliant with
OtpExternal.pidTag where only a subset of the bits are significant (see other constructor).
OtpExternal.newPidTag where all 32 bits of id,serial and creation are significant.
newPidTag can only be decoded by OTP-19 and newer.node
- the nodename.id
- an arbitrary number.serial
- another arbitrary number.creation
- yet another arbitrary number.Method Detail |
---|
protected int tag()
public int serial()
public int id()
public int creation()
public java.lang.String node()
public java.lang.String toString()
toString
in class OtpErlangObject
public void encode(OtpOutputStream buf)
encode
in class OtpErlangObject
buf
- an output stream to which the encoded PID should be written.public boolean equals(java.lang.Object o)
equals
in class OtpErlangObject
o
- the other PID to compare to.
protected int doHashCode()
doHashCode
in class OtpErlangObject
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable<java.lang.Object>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |