org.apache.derby.impl.services.net
Class NetworkPayload
java.lang.Object
org.apache.derby.impl.services.net.NetworkPayload
- All Implemented Interfaces:
- java.io.Serializable
- public class NetworkPayload
- extends java.lang.Object
- implements java.io.Serializable
A class representing a network payload to be sent using the LogicalServer and
LogicalClient. Contains a payload and a type-id. After a NetworkPayload has been
created it is read-only to ensure safety and security in the network protocol
- Author:
- Egil S¿rensen
- See Also:
- Serialized Form
Constructor Summary |
NetworkPayload(int type,
java.lang.Object payload)
Constructor used to set the type and payload |
Method Summary |
java.lang.Object |
getPayload()
Get the object payload |
int |
getType()
Get the type of this NetworkPayload |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TYPE_LOG
public static final int TYPE_LOG
- See Also:
- Constant Field Values
TYPE_ACK
public static final int TYPE_ACK
- See Also:
- Constant Field Values
TYPE_2PC_PREP
public static final int TYPE_2PC_PREP
- See Also:
- Constant Field Values
TYPE_2PC_VOTE_COMMIT
public static final int TYPE_2PC_VOTE_COMMIT
- See Also:
- Constant Field Values
TYPE_2PC_VOTE_ABORT
public static final int TYPE_2PC_VOTE_ABORT
- See Also:
- Constant Field Values
TYPE_2PC_DOCOMMIT
public static final int TYPE_2PC_DOCOMMIT
- See Also:
- Constant Field Values
TYPE_2PC_COMMIT_ACK
public static final int TYPE_2PC_COMMIT_ACK
- See Also:
- Constant Field Values
TYPE_IMALIVE
public static final int TYPE_IMALIVE
- See Also:
- Constant Field Values
TYPE_MESSAGE_STRING
public static final int TYPE_MESSAGE_STRING
- See Also:
- Constant Field Values
TYPE_LSN_REQUEST
public static final int TYPE_LSN_REQUEST
- See Also:
- Constant Field Values
TYPE_LSN_RESPONSE
public static final int TYPE_LSN_RESPONSE
- See Also:
- Constant Field Values
TYPE_ERROR
public static final int TYPE_ERROR
- See Also:
- Constant Field Values
TYPE_WAIT
public static final int TYPE_WAIT
- See Also:
- Constant Field Values
NetworkPayload
public NetworkPayload(int type,
java.lang.Object payload)
- Constructor used to set the type and payload
- Parameters:
type
- The type of this payload. Must be one of the constants of this classpayload
- The payload. Can be any object
getPayload
public java.lang.Object getPayload()
- Get the object payload
- Returns:
- The object contained in the payload
getType
public int getType()
- Get the type of this NetworkPayload
- Returns:
- The type