public final class RoutingKey
extends java.lang.Object
implements java.io.Externalizable
Modifier and Type | Field and Description |
---|---|
static int |
AUTHENTICATE_REMOTE
authenticateRemote() special entry point
|
private int |
contextID
Security context ID
|
private int |
destination
Destination node address
|
static int |
GET_ROUTING_KEY
getRoutingKey() special entry point
|
private int |
groupID
Method group ID
|
static int |
INTERRUPT_SESSION
interruptSession() special entry point
|
private int |
methodID
Method in the group ID
|
static int |
SHUTDOWN_PACKAGE
shutdown() special entry point
|
private int |
source
Source node address
|
static int |
TERMINATE_REMOTE
terminateRemote() special entry point
|
Modifier | Constructor and Description |
---|---|
|
RoutingKey()
Construct a default
RoutingKey instance. |
(package private) |
RoutingKey(int special)
Construct a
RoutingKey instance for special entry point. |
(package private) |
RoutingKey(int groupID,
int methodID)
Construct an instance with specified groupID and methodID.
|
private |
RoutingKey(int group,
int method,
int context,
int src,
int dst)
Construct a complete instance.
|
(package private) |
RoutingKey(RoutingKey other)
Construct a key from other routing key.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Compare two instances.
|
(package private) int |
getContextID()
Provide access to the security context ID.
|
int |
getDestinationAddress()
Provide access to the destination node address.
|
(package private) int |
getGroupID()
Provide access to the method's group ID.
|
(package private) int |
getMethodID()
Provide access to the method ID.
|
int |
getSourceAddress()
Provide access to the source node address.
|
static RoutingKey |
getSpecial(int special)
Creates a special routing key from "system" group.
|
int |
hashCode()
Generate a hash code for use by HashMap.
|
void |
readExternal(java.io.ObjectInput in)
Replacement for the default object reading method.
|
(package private) void |
setContextID(int contextID)
Assign new security context ID
|
void |
setDestinationAddress(int dst)
Assign new destination node address.
|
void |
setSourceAddress(int src)
Assign new source node address.
|
(package private) void |
swapAddresses()
Swap source and destination addresses.
|
void |
writeExternal(java.io.ObjectOutput out)
Replacement for the default object writing method.
|
public static final int GET_ROUTING_KEY
public static final int AUTHENTICATE_REMOTE
public static final int TERMINATE_REMOTE
public static final int SHUTDOWN_PACKAGE
public static final int INTERRUPT_SESSION
private int contextID
private int destination
private int groupID
private int methodID
private int source
public RoutingKey()
RoutingKey
instance. By convention it
points to the getRoutingKey() special entry point (exported by
Dispatcher
).RoutingKey(int special)
RoutingKey
instance for special entry point.special
- This is an ID which will be assigned to groupID and methodID.RoutingKey(int groupID, int methodID)
Dispatcher
for generation of valid
RoutingKey instances for exported entry points created by the
application (unlike special entry points which are created
artificially).groupID
- Method group ID.methodID
- Method ID.RoutingKey(RoutingKey other)
other
- Instance which is used as a source.private RoutingKey(int group, int method, int context, int src, int dst)
group
- Method group ID.method
- Method ID.context
- Security context ID.src
- Source node address.dst
- Destination node address.public static RoutingKey getSpecial(int special)
special
- This is an ID which will be assigned to groupID and methodID.
Must be one of the following:
null
if the parameter is invalid.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- An object to compare with.true
if the two keys are identical.public int getDestinationAddress()
public int getSourceAddress()
public int hashCode()
hashCode
in class java.lang.Object
public void setDestinationAddress(int dst)
dst
- The destination node address.public void setSourceAddress(int src)
src
- The source node address.public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
in
- Input source from which fields will be restored.java.io.IOException
- In case of I/O errors.java.lang.ClassNotFoundException
- If the payload can't be instantiated.public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
out
- The output destination to which fields will be saved.java.io.IOException
- In case of I/O errors.int getContextID()
int getGroupID()
int getMethodID()
void setContextID(int contextID)
contextID
- New security context ID.void swapAddresses()