|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsds.data.Reference
public final class Reference
Mean for identifying distributed objects and providing messages delivery contact information
Field Summary | |
---|---|
static long |
DEFAULT_VALUE
|
static int |
NO_PORT
|
Constructor Summary | |
---|---|
Reference()
Creates an uninitialized reference |
|
Reference(Reference other)
Creates and initializes this reference with another reference |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object other)
|
boolean |
fromString(java.lang.String value)
Initializes from a string representation |
java.lang.String |
getAddress()
|
long |
getId()
Gets this reference's identifier |
long |
getNonce()
|
int |
getPort()
The port assigned to the referenced distributed object. |
int |
hashCode()
|
boolean |
isInvokable()
Checks whether this reference points to a client-oriented or a server-oriented distributed object |
void |
setAddress(java.lang.String address)
Initializes the IP address with a given address |
void |
setId(long id)
Assigns an identifier to this reference |
void |
setNonce(long nonce)
|
void |
setPort(int port)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final long DEFAULT_VALUE
public static final int NO_PORT
Constructor Detail |
---|
public Reference()
Creates an uninitialized reference
public Reference(Reference other)
Creates and initializes this reference with another reference
other
- A null reference leaves this reference
uninitialized. This reference duplicates the given reference otherwiseMethod Detail |
---|
public boolean fromString(java.lang.String value)
Initializes from a string representation
value
-
public long getId()
Gets this reference's identifier
public void setId(long id)
Assigns an identifier to this reference
id
- A positive idpublic long getNonce()
public void setNonce(long nonce)
nonce
- Any random valuepublic java.lang.String getAddress()
public void setAddress(java.lang.String address)
Initializes the IP address with a given address
address
- The host IP address. Should neither be null nor
empty to initialize this reference withpublic int getPort()
The port assigned to the referenced distributed object. This port is valid only when referencing a running server-oriented object
NO_PORT
)
indicates either a client-oriented or a non-running server-oriented
distributed objectpublic void setPort(int port)
port
- The port number. Must be strictly positive to be validpublic boolean isInvokable()
Checks whether this reference points to a client-oriented or a server-oriented distributed object
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |