|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--com.distributed.api.Message
Class to hold a Message
| Field Summary | |
java.lang.String |
clock
String Value of Clock of the Message |
int |
clocktype
Clock Value of the Message |
static int |
CONSENSUS_PROPOSITION
Constant used in the Class, Type of Message, Consensus Section |
static int |
CONSENSUS_START
Constant used in the Class, Type of Message, Consensus Section |
static int |
CS_REQUEST
Constant used in the Class, Type of Message, Lock section |
int |
dest
Destination of the Message |
static int |
LEADER_ACCEPTED
Constant used in the Class, Type of Message, Election Section |
static int |
LEADER_PROPOSITION
Constant used in the Class, Type of Message, Election Section |
static int |
MARKER
Constant used in the Class, Type of Message, Camera Section |
java.lang.String |
messg
Program part of message of the Message |
int |
messgtype
Type of the Message |
static int |
NEW_COORDINATOR
Constant used in the Class, Type of Message, Election Section |
static int |
NORMAL_MESSAGE
Constant used in the Class, Type of Message |
static int |
OK_MESSAGE
Constant used in the Class, Type of Message, Lock Section |
boolean |
red_message
Indicator if message is Red or white |
static int |
SNAPSHOT_REQUEST
Constant used in the Class, Type of Message, Camera Section |
static int |
SNAPSHOT_RESPONSE
Constant used in the Class, Type of Message, Camera Section |
int |
source
Source of the Message |
| Constructor Summary | |
Message(int spid,
int mtype,
java.lang.String m,
boolean red,
java.lang.String c,
int ct)
Constructor to be normally used |
|
| Method Summary | |
static java.lang.String |
constructMessage(int spid,
int messgtype,
java.lang.String messg,
boolean red_message,
java.lang.String clock,
int clock_type)
Method to return a String composing the Message. |
static Message |
decodeMessage(java.lang.String m)
Method to convert a String received over channel into a Message Object |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public java.lang.String clock
public int clocktype
public static final int CONSENSUS_PROPOSITION
public static final int CONSENSUS_START
public static final int CS_REQUEST
public int dest
public static final int LEADER_ACCEPTED
public static final int LEADER_PROPOSITION
public static final int MARKER
public java.lang.String messg
public int messgtype
public static final int NEW_COORDINATOR
public static final int NORMAL_MESSAGE
public static final int OK_MESSAGE
public boolean red_message
public static final int SNAPSHOT_REQUEST
public static final int SNAPSHOT_RESPONSE
public int source
| Constructor Detail |
public Message(int spid,
int mtype,
java.lang.String m,
boolean red,
java.lang.String c,
int ct)
spid - Source of the messagemtype - Message Typem - Message Partred - Whether message is red or whitec - Clock valuect - Clock Type| Method Detail |
public static java.lang.String constructMessage(int spid,
int messgtype,
java.lang.String messg,
boolean red_message,
java.lang.String clock,
int clock_type)
spid - Source of the messagemessgtype - Message Typemessg - Message Partred_message - Whether message is red or whiteclock - Clock valueclock_type - Clock Type
public static Message decodeMessage(java.lang.String m)
throws java.lang.Exception
m - String form
java.lang.Exception
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||