org.kth.dks.dks_marshal
Class DKSMessage
java.lang.Object
org.kth.dks.dks_marshal.DKSMessage
- Direct Known Subclasses:
- AckByeMsg, AckHelloMsg, AckJoinInitMsg, AdaptLeaveMsg, AdaptMsg, AddItemMsg, AddToBindingMsg, BadPointerMsg, BecomeNormalMsg, BootstrapMsg, BroadCastMsg, ByeMsg, ChangeItemMsg, CorrectionOnJoinMsg, CorrectionOnLeaveMsg, CreateMCastGroupMsg, CreateMCastGroupReplyMsg, DHTRestoreItemsMsg, DHTRestoreReplicasMsg, DHTResultMsg, DHTStateTransferMsg, FailureMsg, GetItemsMsg, HeartbeatMsg, HelloMsg, InsertNodeMsg, JoinInitMsg, JoinMCastGroupMsg, KeepAliveMsg, LeaveAcceptMsg, LeaveRejectMsg, LeaveRequestMsg, LiveNodesMsg, LookupBindingMsg, LookupFailureMsg, LookupMsg, LookupRequestMsg, LookupResponseMsg, LookupResultMsg, MCastGroupInfoMsg, MCastGroupInfoReplyMsg, NodeLeftMsg, PingMsg, PongMsg, RemoveFromBindingMsg, RemoveItemMsg, ReplicateMsg, ReplicationFinishedMsg, RestartJoinMsg, RestartOperationMsg, RetreiveItemsMsg, RetrieveItemsMsg, StrechMeasurementMsg
public abstract class DKSMessage
- extends java.lang.Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
messageMapUnsync
protected static java.util.Map messageMapUnsync
messageMap
protected static java.util.Map messageMap
marshaler
protected MarshalInterface marshaler
pCount
protected int pCount
xmsg
protected XMLMessage xmsg
ele
protected XMLElement ele
eleCnt
protected int eleCnt
DKSMessage
public DKSMessage()
getSendRef
public final DKSRef getSendRef()
getRecvRef
public final DKSRef getRecvRef()
setSendRef
public final void setSendRef(DKSRef s)
setRecvRef
public final void setRecvRef(DKSRef r)
unmarshal
public static DKSMessage unmarshal(byte[] raw)
unmarshal
public static DKSMessage unmarshal(byte transType,
byte[] raw)
addMessageType
public static void addMessageType(java.lang.String msgInternalXMLTAG,
java.lang.String nameOfClass)
- Adds a TAG string, e.g. "LOOKUPMSG", into a Map which maps it to a DKSMessage (narrowed) class, e.g. "dks_marshal.LookupMsg"
Used to initially by the application and DKSNode to install message types and their corresponding class
- Parameters:
msgInternalXMLTAG - String Tag describing the messagenameOfClass - String Fully qualified (absolute) name of the class (example: org.kth.dks.MyClass)
addMessageTypePrefixed
public static void addMessageTypePrefixed(java.lang.String msgInternalXMLTAG,
java.lang.String nameOfClass)
- Adds a TAG string, e.g. "LOOKUPMSG", into a Map which maps it to a DKSMessage (narrowed) class, e.g. "dks_marshal.LookupMsg"
Used to initially by the application and DKSNode to install message types and their corresponding class
- Parameters:
msgInternalXMLTAG - String Tag describing the messagenameOfClass - String name of the class relative to the package org.kth.dks (this.BASEPACKAGE)
getName
public abstract java.lang.String getName()
marshal
public abstract void marshal()
throws java.io.IOException
- Throws:
java.io.IOException
unmarshal
public abstract void unmarshal()
throws java.io.IOException
- Throws:
java.io.IOException
flatten
public final byte[] flatten()
Copyright © 2010. All Rights Reserved.