sg.edu.nus.protocol
Enum MsgType

java.lang.Object
  extended by java.lang.Enum<MsgType>
      extended by sg.edu.nus.protocol.MsgType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<MsgType>

public enum MsgType
extends java.lang.Enum<MsgType>

Define the message type of the Message. NOTE: The value of 0xFFFFFFFF is preserved as the default value.

Version:
1.0 2006-1-4
Author:
Xu Linhao

Enum Constant Summary
access_control
           
ACCESS_CONTROL_BOOTSTRAP_USER_UPDATE
          bootstrap peer's message of user update
ACCESS_CONTROL_NORMAL_PEER_USER_UPDATE
          normal peer's message of user update
ACCESS_CONTROL_ROLE_REQUEST
          normal peer request for role-setting update
ACCESS_CONTROL_ROLE_RESULT
          bootstrap peer respond to role-setting update
ADD_FRIEND
          add a friend, used in messenger
ATTACH_FAILURE
          When a peer fails to attach to a super peer, the super peer will notify the client for this event.
ATTACH_REQUEST
          When a peer tries to attach to a super peer, it will notify the super peer for this event.
ATTACH_SUCCESS
          When a peer attaches to a super peer successfully, the super peer will notify the client peer for this event.
CA_ADD_USER_TO_GROUP
          If the owner of a user group tries to inviate a user to join his user group.
CA_ADD_USER_TO_GROUP_FAILURE
          If a user cannot be invited into a user group.
CA_ADD_USER_TO_GROUP_SUCCESS
          If a user is invited to join a user group successfully.
CA_CREATE_GROUP
          If a user tries to create a new user group.
CA_CREATE_GROUP_FAILURE
          If the user group has not been created.
CA_CREATE_GROUP_SUCCESS
          If the user group has been created successfully.
CA_DELETE_GROUP
          If a user tries to delete a user group.
CA_DELETE_GROUP_FAILURE
          If the user group has not been deleted.
CA_DELETE_GROUP_SUCCESS
          If the user group has been deleted successfully.
CA_DELETE_USER
          If a user tries to delete a user.
CA_DELETE_USER_FAILURE
          If the user has not been deleted.
CA_DELETE_USER_SUCCESS
          If the user has been deleted successfully.
CA_GET_CERT
          When a peer requires a certificate from the certificate authority.
CA_GET_GROUPLIST
          When the certificate authority tries to get the group list from a user.
CA_GET_GROUPLIST_FAILURE
          If get the group list failure.
CA_GET_GROUPLIST_SUCCESS
          If get the group list successfully.
CA_GET_USERLIST
          When the certificate authority tries to get all users in a certain user group.
CA_GET_USERLIST_FAILURE
          If all users in a certain user group cannot be obtained.
CA_GET_USERLIST_SUCCESS
          If all users in a certain user group are obtained successfully.
CA_LEAVE
          When the certificate authority leaves the system.
CA_RE_CERT
          When the certificate authority returns a certificate to the request peer.
CA_VALIDATE_FAILURE
          If the action that the certificate authority validate a user by his key fails.
CA_VALIDATE_SUCCESS
          If the action that the certificate authority validate a user by his key success.
CA_VALIDATE_USER
          When the certificate authority tries to validate a user by his key.
cert_authority
           
Change_PROPERTY
          change a property
CHECK_USER
          When check whether exists such a user, if have such an user, then return USER_EXISTED message; otherwise, the message USER_NOT_EXIST will be returned.
COLUMN_INDEX_SEARCH
           
common
           
CONN_FAILED
          If cannot connect to the bootstrap server.
database
           
DB_INDEX_NOTIFICATION
          insert new tuple index
DB_INSERT_RANGE_INDEX
          insert range index of a table
DB_INSERT_TUPLE_INDEX
          insert tuple index of a table
DB_QUERY
          relational query
DB_QUERY_RESULT
          query result
DEFAULT
          the default and empty message type and no action should be responsible for processing this message
DOWNLOAD
          When a peer downloads a file from a remote peer, it will notify the peer for this event.
DOWNLOAD_ACK
          When a peer finishes file downloading, it will notify the remote peer for this event.
DOWNLOAD_NACK
          When a peer can not finish file downloading, it will notify the remote peer for this event
ERP_DELETE_COLUMN_INDEX
          to delete column index
ERP_DELETE_DATA_INDEX
          to delete data index
ERP_DELETE_TABLE_INDEX
          to delete table index
ERP_INSERT_COLUMN_INDEX
          to insert column index
ERP_INSERT_DATA_INDEX
          to insert data index
ERP_INSERT_TABLE_INDEX
          to insert table index
erp_message
           
ERP_UPDATE_COLUMN_INDEX
          to delete column index
ERP_UPDATE_DATA_INDEX
          to update data index
FORCE_OUT
          If a super peer receives a troubleshoot message from bootstrap peer, then it will send a force-out message to all its client peers.
I_WILL_LEAVE
          When a peer wants to leave the system without any failure events, it will notify all peers for this event.
index_search
           
JOIN_FAILURE
          If a peer cannot joins the system via an existing super peer, it should send this message to notify the bootstrap and then the bootstrap server will remove it from OnlinePeerMgr.
JOIN_SUCCESS
          When a peer signs in the system successfully, it will be registered into an OnlinePeerMgr.
KB_INDEX_TYPE
          define type of file to be indexed sent from knowledge bank interface modified by Xu Linhao
KB_QUERY
          define type of results for knowledge bank interface modified by Xu Linhao
KB_QUERY_TYPE
          define type of query sent from knowlelege bank interface modified by Yu Bei
KB_RESULT
          define type of results for knowledge bank interface modified by Xu Linhao
LACK
          If a user signs in the system successfully, then the bootstrap server returns this message.
LNCK
          If a user signs in the system failed, then the bootstrap server returns this message.
LOGIN
          When a user signs in the system, if successfully, then return LACK; otherwise, return LNCK.
NO_ONLINE_SUPER_PEER
          When a client peer wants to join the system, if there are not any super peers in the system, then the bootstrap server will reply this client peer for this message.
PASSWORD_INVALID
          If the password that the user input is invalid.
peer_to_peer
           
peer_to_superpeer
           
PING
          The bootstrap server will send a ping message to each online peer at regular time interval, for testing whether the peer is still online now.
PONG
          The peer received a ping message will reply a pong message to the bootstrap server, for indicating its online state.
PROJECT_MYMESSAGE
          This message is only for demonstration *
QUERY_PEER
           
QUERY_PEER_RESULT
           
query_result
           
RACK
          If a user registers to the system successfully, then the bootstrap server returns this message.
REGISTER
          When a user registers himself to the system, if successfully, then return RACK; otherwise, return RNCK.
RESULT
          collecting results passed from super peer.
RNCK
          If a user cannot register to the system, then the bootstrap server returns this message.
SCHEMA_UPDATE
          send a schema update from bootstrap peer to superpeer added by mihai, june 2nd 2008
SESSION_SHOULD_NOT_EXIST
          If the user session should not exist.
SP_DELETE
          When a super peer deletes some data items.
SP_DELETE_BUNDLE
           
SP_INSERT
          When a super peer inserts some data items.
SP_INSERT_BUNDLE
           
SP_JOIN
          When a super peer joins the network.
SP_JOIN_ACCEPT
          When a super peer joins the network and is accepted by a certain super peer.
SP_JOIN_FORCED
          Not sure, should be updated by QH.
SP_JOIN_FORCED_FORWARD
          Not sure, should be updated by QH.
SP_JOIN_SPLIT_DATA
          When a super peer joins the network successfully, it needs to split the parent's index range.
SP_LB_FIND_LIGHTLY_NODE
          When a super peer tries to find a underload super peer.
SP_LB_GET_LOAD_INFO
          When a super peer gets the load information before executing the load balance.
SP_LB_GET_LOAD_INFO_REPLY
          Not sure, should be updated by QH.
SP_LB_GET_LOAD_INFO_RESEND
          Not sure, should be updated by QH.
SP_LB_NO_ROTATION_NODE
          When a super peer executes the load balance, if there does not exist any node to do rotation.
SP_LB_ROTATE_UPDATE_ADJACENT
          When a super peer executes the load balance, then it updates its adjacent nodes.
SP_LB_ROTATE_UPDATE_ADJACENT_REPLY
          When a super peer executes the load balance, then its new adjacent nodes will send back this message to it.
SP_LB_ROTATE_UPDATE_CHILD
          When a super peer executes the load balance, then it updates its child nodes.
SP_LB_ROTATE_UPDATE_CHILD_REPLY
          When a super peer executes the load balance, then its new child nodes will send back this message to it.
SP_LB_ROTATE_UPDATE_PARENT
          When a super peer executes the load balance, then it updates its parent node.
SP_LB_ROTATE_UPDATE_PARENT_REPLY
          When a super peer executes the load balance, then its new parent node will send back this message to it.
SP_LB_ROTATE_UPDATE_ROUTING_TABLE
          When a super peer executes the load balance, then it updates its routing table.
SP_LB_ROTATE_UPDATE_ROUTING_TABLE_REPLY
          When a super peer executes the load balance, then all new nodes in the routing table will sends back this message to it.
SP_LB_ROTATION_PULL
          Not sure, should be updated by QH.
SP_LB_SPLIT_DATA
          When a super peer executes the load balance, then it updates its index range.
SP_LB_SPLIT_DATA_RESEND
          Not sure, should be updated by QH.
SP_LB_STABLE_POSITION
          Not sure, should be updated by QH.
SP_LEAVE
          When a super peer leaves the network.
SP_LEAVE_FIND_REPLACEMENT_NODE
          Before a super peer leaves the network, it will send this message to find a super peer to replace his position after its departure.
SP_LEAVE_FIND_REPLACEMENT_NODE_REPLY
          The super peer that will replace the position of the peer who will leave the network, will send back a reply message.
SP_LEAVE_NOTIFY
           
SP_LEAVE_NOTIFY_CLIENT
           
SP_LEAVE_REPLACEMENT
          When a super peer leaves the network and notifies another super peer to replace his position if the tree balance cannot be satisfied.
SP_LEAVE_URGENT
           
SP_LI_ADJACENT
          When a super peer looks up adjacent node of a failed node
SP_LI_ADJACENT_REPLY
          When a super peer replies the SP_LI_ADJACENT request
SP_LI_ADJACENT_ROOT
           
SP_LI_ADJACENT_ROOT_REPLY
           
SP_LI_CHILD_REPLY
          When a super peer replies information of child nodes for the parent of the failed node
SP_LI_ROUTING_TABLE
          When a super peer looks up routing table information of a failed node
SP_LI_ROUTING_TABLE_REPLY
          When a super peer replies the SP_LI_ROUTING_TABLE request
SP_LI_UPDATE_PARENT
          When a super peer wants to update information of parent node of the failed node
SP_NOTIFY_FAILURE
          When a super wants to notify parent of a failed node about failure
SP_NOTIFY_IMBALANCE
          When a super peer's workload is imbalance or it found other super peers become overload or underload, then it will notify other peers to begin an load balance operation.
SP_PASS_CLIENT
           
SP_RECEIVED_MESSAGE
          If a super peer received a message
SP_SEARCH_EXACT
          When a super peer executes an exact search.
SP_SEARCH_EXACT_BUNDLE
           
SP_SEARCH_EXACT_RESULT
          When a super peer gets the result of an exact search.
SP_SEARCH_PAIR
           
SP_SEARCH_RANGE
          When a super peer executes a range search.
SP_SEARCH_RANGE_BUNDLE
           
SP_SEARCH_RANGE_RESULT
          When a super peer get the result of a range search.
SP_UPDATE
          When the index of a document is updated at super peer side
SP_UPDATE_ADJACENT_LINK
          When a super peer updates its adjacent links.
SP_UPDATE_BUNDLE
           
SP_UPDATE_MAX_MIN_VALUE
          When a super peer updates its index range with both the maximum and minimum values.
SP_UPDATE_ROUTING_TABLE
          When a super peer updates its routing table.
SP_UPDATE_ROUTING_TABLE_DIRECTLY
          When a super peer updates its routing table directly (for what reason?)
SP_UPDATE_ROUTING_TABLE_INDIRECTLY
          When a super peer updates its routing table indirectly (for what reason?)
SP_UPDATE_ROUTING_TABLE_REPLY
          When a super peer gets the reply from remote super peers for updating routing table.
Superpeer_to_peer
           
superpeer_to_superpeer
           
TABLE_DATA
           
TABLE_INDEX_SEARCH
           
TABLE_INDEX_SEARCH_RESULT
           
TABLE_RETRIEVAL
           
TROUBLESHOOT
          When bootstrap server leaves the network, it will broadcast a troubleshoot message to all super peers and each super peer will send a force-out message to all its client peers.
UNIQUE_SUPER_PEER
          When a super peer joins the system, if the bootstrap server finds that this super peer is the only online super peer, then it will notify this super peer this message.
UPLOAD_INDEX_INFO
          When a peer shares some files to other peers, the index will be created and then the indexed meta data will be transferred to its super peer for constructing distributed index.
UPLOAD_REINDEX_INFO
          When a peer re-index its sharable files, the index will be re-transferred to its super peer for updating the distributed index managed by all super peers.
USER_EXISTED
          If the user has already existed.
USER_NOT_EXIST
          If the user does not exist.
 
Method Summary
static boolean checkValue(int msgType)
          Check if the message type exists.
static java.lang.String description(int msgType)
          Get the description of the MsgType.
 int getValue()
          Get the value of the message type.
static MsgType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static MsgType[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

common

public static final MsgType common

REGISTER

public static final MsgType REGISTER
When a user registers himself to the system, if successfully, then return RACK; otherwise, return RNCK.


LOGIN

public static final MsgType LOGIN
When a user signs in the system, if successfully, then return LACK; otherwise, return LNCK.


CHECK_USER

public static final MsgType CHECK_USER
When check whether exists such a user, if have such an user, then return USER_EXISTED message; otherwise, the message USER_NOT_EXIST will be returned.


JOIN_SUCCESS

public static final MsgType JOIN_SUCCESS
When a peer signs in the system successfully, it will be registered into an OnlinePeerMgr. However, only when the peer can join the system via an existing super peer successfully, then the peer will be displayed into the bootstrap server. So this message will use for indicating that a peer successfully joins the system via an existing super peer.


JOIN_FAILURE

public static final MsgType JOIN_FAILURE
If a peer cannot joins the system via an existing super peer, it should send this message to notify the bootstrap and then the bootstrap server will remove it from OnlinePeerMgr.


RACK

public static final MsgType RACK
If a user registers to the system successfully, then the bootstrap server returns this message.


RNCK

public static final MsgType RNCK
If a user cannot register to the system, then the bootstrap server returns this message.


LACK

public static final MsgType LACK
If a user signs in the system successfully, then the bootstrap server returns this message.


LNCK

public static final MsgType LNCK
If a user signs in the system failed, then the bootstrap server returns this message.


CONN_FAILED

public static final MsgType CONN_FAILED
If cannot connect to the bootstrap server.


USER_EXISTED

public static final MsgType USER_EXISTED
If the user has already existed.


USER_NOT_EXIST

public static final MsgType USER_NOT_EXIST
If the user does not exist.


PASSWORD_INVALID

public static final MsgType PASSWORD_INVALID
If the password that the user input is invalid.


SESSION_SHOULD_NOT_EXIST

public static final MsgType SESSION_SHOULD_NOT_EXIST
If the user session should not exist. Notice that this message is not used for communicating with other peers.


PING

public static final MsgType PING
The bootstrap server will send a ping message to each online peer at regular time interval, for testing whether the peer is still online now.


PONG

public static final MsgType PONG
The peer received a ping message will reply a pong message to the bootstrap server, for indicating its online state.


UNIQUE_SUPER_PEER

public static final MsgType UNIQUE_SUPER_PEER
When a super peer joins the system, if the bootstrap server finds that this super peer is the only online super peer, then it will notify this super peer this message. Then, this super peer can directly join the system without choosing an existing super peer.


NO_ONLINE_SUPER_PEER

public static final MsgType NO_ONLINE_SUPER_PEER
When a client peer wants to join the system, if there are not any super peers in the system, then the bootstrap server will reply this client peer for this message. This client peer cannot join the system.


I_WILL_LEAVE

public static final MsgType I_WILL_LEAVE
When a peer wants to leave the system without any failure events, it will notify all peers for this event.


TROUBLESHOOT

public static final MsgType TROUBLESHOOT
When bootstrap server leaves the network, it will broadcast a troubleshoot message to all super peers and each super peer will send a force-out message to all its client peers.


ADD_FRIEND

public static final MsgType ADD_FRIEND
add a friend, used in messenger


Change_PROPERTY

public static final MsgType Change_PROPERTY
change a property


SCHEMA_UPDATE

public static final MsgType SCHEMA_UPDATE
send a schema update from bootstrap peer to superpeer added by mihai, june 2nd 2008


peer_to_peer

public static final MsgType peer_to_peer

DOWNLOAD

public static final MsgType DOWNLOAD
When a peer downloads a file from a remote peer, it will notify the peer for this event.


DOWNLOAD_ACK

public static final MsgType DOWNLOAD_ACK
When a peer finishes file downloading, it will notify the remote peer for this event.


DOWNLOAD_NACK

public static final MsgType DOWNLOAD_NACK
When a peer can not finish file downloading, it will notify the remote peer for this event


peer_to_superpeer

public static final MsgType peer_to_superpeer

ATTACH_REQUEST

public static final MsgType ATTACH_REQUEST
When a peer tries to attach to a super peer, it will notify the super peer for this event.


ATTACH_SUCCESS

public static final MsgType ATTACH_SUCCESS
When a peer attaches to a super peer successfully, the super peer will notify the client peer for this event. Upon receiving this message, the client peer enable its UI components and is ready for performing operations, such as search, share, upload, and download etc.


ATTACH_FAILURE

public static final MsgType ATTACH_FAILURE
When a peer fails to attach to a super peer, the super peer will notify the client for this event.


UPLOAD_INDEX_INFO

public static final MsgType UPLOAD_INDEX_INFO
When a peer shares some files to other peers, the index will be created and then the indexed meta data will be transferred to its super peer for constructing distributed index.


UPLOAD_REINDEX_INFO

public static final MsgType UPLOAD_REINDEX_INFO
When a peer re-index its sharable files, the index will be re-transferred to its super peer for updating the distributed index managed by all super peers.


KB_QUERY_TYPE

public static final MsgType KB_QUERY_TYPE
define type of query sent from knowlelege bank interface modified by Yu Bei


KB_INDEX_TYPE

public static final MsgType KB_INDEX_TYPE
define type of file to be indexed sent from knowledge bank interface modified by Xu Linhao


KB_RESULT

public static final MsgType KB_RESULT
define type of results for knowledge bank interface modified by Xu Linhao


KB_QUERY

public static final MsgType KB_QUERY
define type of results for knowledge bank interface modified by Xu Linhao


Superpeer_to_peer

public static final MsgType Superpeer_to_peer

FORCE_OUT

public static final MsgType FORCE_OUT
If a super peer receives a troubleshoot message from bootstrap peer, then it will send a force-out message to all its client peers.


RESULT

public static final MsgType RESULT
collecting results passed from super peer.


superpeer_to_superpeer

public static final MsgType superpeer_to_superpeer

SP_RECEIVED_MESSAGE

public static final MsgType SP_RECEIVED_MESSAGE
If a super peer received a message


SP_DELETE

public static final MsgType SP_DELETE
When a super peer deletes some data items.


SP_DELETE_BUNDLE

public static final MsgType SP_DELETE_BUNDLE

SP_INSERT

public static final MsgType SP_INSERT
When a super peer inserts some data items.


SP_INSERT_BUNDLE

public static final MsgType SP_INSERT_BUNDLE

SP_JOIN_ACCEPT

public static final MsgType SP_JOIN_ACCEPT
When a super peer joins the network and is accepted by a certain super peer.


SP_JOIN

public static final MsgType SP_JOIN
When a super peer joins the network.


SP_JOIN_FORCED

public static final MsgType SP_JOIN_FORCED
Not sure, should be updated by QH.


SP_JOIN_FORCED_FORWARD

public static final MsgType SP_JOIN_FORCED_FORWARD
Not sure, should be updated by QH.


SP_JOIN_SPLIT_DATA

public static final MsgType SP_JOIN_SPLIT_DATA
When a super peer joins the network successfully, it needs to split the parent's index range.


SP_LB_FIND_LIGHTLY_NODE

public static final MsgType SP_LB_FIND_LIGHTLY_NODE
When a super peer tries to find a underload super peer.


SP_LB_GET_LOAD_INFO

public static final MsgType SP_LB_GET_LOAD_INFO
When a super peer gets the load information before executing the load balance.


SP_LB_GET_LOAD_INFO_REPLY

public static final MsgType SP_LB_GET_LOAD_INFO_REPLY
Not sure, should be updated by QH.


SP_LB_GET_LOAD_INFO_RESEND

public static final MsgType SP_LB_GET_LOAD_INFO_RESEND
Not sure, should be updated by QH.


SP_LB_NO_ROTATION_NODE

public static final MsgType SP_LB_NO_ROTATION_NODE
When a super peer executes the load balance, if there does not exist any node to do rotation.


SP_LB_ROTATE_UPDATE_ADJACENT

public static final MsgType SP_LB_ROTATE_UPDATE_ADJACENT
When a super peer executes the load balance, then it updates its adjacent nodes.


SP_LB_ROTATE_UPDATE_ADJACENT_REPLY

public static final MsgType SP_LB_ROTATE_UPDATE_ADJACENT_REPLY
When a super peer executes the load balance, then its new adjacent nodes will send back this message to it.


SP_LB_ROTATE_UPDATE_CHILD

public static final MsgType SP_LB_ROTATE_UPDATE_CHILD
When a super peer executes the load balance, then it updates its child nodes.


SP_LB_ROTATE_UPDATE_CHILD_REPLY

public static final MsgType SP_LB_ROTATE_UPDATE_CHILD_REPLY
When a super peer executes the load balance, then its new child nodes will send back this message to it.


SP_LB_ROTATE_UPDATE_PARENT

public static final MsgType SP_LB_ROTATE_UPDATE_PARENT
When a super peer executes the load balance, then it updates its parent node.


SP_LB_ROTATE_UPDATE_PARENT_REPLY

public static final MsgType SP_LB_ROTATE_UPDATE_PARENT_REPLY
When a super peer executes the load balance, then its new parent node will send back this message to it.


SP_LB_ROTATE_UPDATE_ROUTING_TABLE

public static final MsgType SP_LB_ROTATE_UPDATE_ROUTING_TABLE
When a super peer executes the load balance, then it updates its routing table.


SP_LB_ROTATE_UPDATE_ROUTING_TABLE_REPLY

public static final MsgType SP_LB_ROTATE_UPDATE_ROUTING_TABLE_REPLY
When a super peer executes the load balance, then all new nodes in the routing table will sends back this message to it.


SP_LB_ROTATION_PULL

public static final MsgType SP_LB_ROTATION_PULL
Not sure, should be updated by QH.


SP_LB_SPLIT_DATA

public static final MsgType SP_LB_SPLIT_DATA
When a super peer executes the load balance, then it updates its index range.


SP_LB_SPLIT_DATA_RESEND

public static final MsgType SP_LB_SPLIT_DATA_RESEND
Not sure, should be updated by QH.


SP_LB_STABLE_POSITION

public static final MsgType SP_LB_STABLE_POSITION
Not sure, should be updated by QH.


SP_LEAVE

public static final MsgType SP_LEAVE
When a super peer leaves the network.


SP_LEAVE_URGENT

public static final MsgType SP_LEAVE_URGENT

SP_LEAVE_NOTIFY

public static final MsgType SP_LEAVE_NOTIFY

SP_LEAVE_NOTIFY_CLIENT

public static final MsgType SP_LEAVE_NOTIFY_CLIENT

SP_PASS_CLIENT

public static final MsgType SP_PASS_CLIENT

SP_LEAVE_FIND_REPLACEMENT_NODE

public static final MsgType SP_LEAVE_FIND_REPLACEMENT_NODE
Before a super peer leaves the network, it will send this message to find a super peer to replace his position after its departure.


SP_LEAVE_FIND_REPLACEMENT_NODE_REPLY

public static final MsgType SP_LEAVE_FIND_REPLACEMENT_NODE_REPLY
The super peer that will replace the position of the peer who will leave the network, will send back a reply message.


SP_LEAVE_REPLACEMENT

public static final MsgType SP_LEAVE_REPLACEMENT
When a super peer leaves the network and notifies another super peer to replace his position if the tree balance cannot be satisfied.


SP_NOTIFY_IMBALANCE

public static final MsgType SP_NOTIFY_IMBALANCE
When a super peer's workload is imbalance or it found other super peers become overload or underload, then it will notify other peers to begin an load balance operation.


SP_SEARCH_EXACT

public static final MsgType SP_SEARCH_EXACT
When a super peer executes an exact search.


SP_SEARCH_PAIR

public static final MsgType SP_SEARCH_PAIR

SP_SEARCH_EXACT_BUNDLE

public static final MsgType SP_SEARCH_EXACT_BUNDLE

SP_SEARCH_EXACT_RESULT

public static final MsgType SP_SEARCH_EXACT_RESULT
When a super peer gets the result of an exact search.


SP_SEARCH_RANGE

public static final MsgType SP_SEARCH_RANGE
When a super peer executes a range search.


SP_SEARCH_RANGE_BUNDLE

public static final MsgType SP_SEARCH_RANGE_BUNDLE

SP_SEARCH_RANGE_RESULT

public static final MsgType SP_SEARCH_RANGE_RESULT
When a super peer get the result of a range search.


SP_UPDATE_ADJACENT_LINK

public static final MsgType SP_UPDATE_ADJACENT_LINK
When a super peer updates its adjacent links.


SP_UPDATE_MAX_MIN_VALUE

public static final MsgType SP_UPDATE_MAX_MIN_VALUE
When a super peer updates its index range with both the maximum and minimum values.


SP_UPDATE_ROUTING_TABLE

public static final MsgType SP_UPDATE_ROUTING_TABLE
When a super peer updates its routing table.


SP_UPDATE_ROUTING_TABLE_DIRECTLY

public static final MsgType SP_UPDATE_ROUTING_TABLE_DIRECTLY
When a super peer updates its routing table directly (for what reason?)


SP_UPDATE_ROUTING_TABLE_INDIRECTLY

public static final MsgType SP_UPDATE_ROUTING_TABLE_INDIRECTLY
When a super peer updates its routing table indirectly (for what reason?)


SP_UPDATE_ROUTING_TABLE_REPLY

public static final MsgType SP_UPDATE_ROUTING_TABLE_REPLY
When a super peer gets the reply from remote super peers for updating routing table.


SP_LI_ADJACENT

public static final MsgType SP_LI_ADJACENT
When a super peer looks up adjacent node of a failed node


SP_LI_ADJACENT_ROOT

public static final MsgType SP_LI_ADJACENT_ROOT

SP_LI_ADJACENT_REPLY

public static final MsgType SP_LI_ADJACENT_REPLY
When a super peer replies the SP_LI_ADJACENT request


SP_LI_ADJACENT_ROOT_REPLY

public static final MsgType SP_LI_ADJACENT_ROOT_REPLY

SP_LI_ROUTING_TABLE

public static final MsgType SP_LI_ROUTING_TABLE
When a super peer looks up routing table information of a failed node


SP_LI_ROUTING_TABLE_REPLY

public static final MsgType SP_LI_ROUTING_TABLE_REPLY
When a super peer replies the SP_LI_ROUTING_TABLE request


SP_LI_CHILD_REPLY

public static final MsgType SP_LI_CHILD_REPLY
When a super peer replies information of child nodes for the parent of the failed node


SP_LI_UPDATE_PARENT

public static final MsgType SP_LI_UPDATE_PARENT
When a super peer wants to update information of parent node of the failed node


SP_NOTIFY_FAILURE

public static final MsgType SP_NOTIFY_FAILURE
When a super wants to notify parent of a failed node about failure


SP_UPDATE

public static final MsgType SP_UPDATE
When the index of a document is updated at super peer side


SP_UPDATE_BUNDLE

public static final MsgType SP_UPDATE_BUNDLE

cert_authority

public static final MsgType cert_authority

CA_GET_CERT

public static final MsgType CA_GET_CERT
When a peer requires a certificate from the certificate authority.


CA_RE_CERT

public static final MsgType CA_RE_CERT
When the certificate authority returns a certificate to the request peer.


CA_VALIDATE_USER

public static final MsgType CA_VALIDATE_USER
When the certificate authority tries to validate a user by his key.


CA_VALIDATE_SUCCESS

public static final MsgType CA_VALIDATE_SUCCESS
If the action that the certificate authority validate a user by his key success.


CA_VALIDATE_FAILURE

public static final MsgType CA_VALIDATE_FAILURE
If the action that the certificate authority validate a user by his key fails.


CA_CREATE_GROUP

public static final MsgType CA_CREATE_GROUP
If a user tries to create a new user group.


CA_CREATE_GROUP_SUCCESS

public static final MsgType CA_CREATE_GROUP_SUCCESS
If the user group has been created successfully.


CA_CREATE_GROUP_FAILURE

public static final MsgType CA_CREATE_GROUP_FAILURE
If the user group has not been created.


CA_DELETE_USER

public static final MsgType CA_DELETE_USER
If a user tries to delete a user.


CA_DELETE_USER_SUCCESS

public static final MsgType CA_DELETE_USER_SUCCESS
If the user has been deleted successfully.


CA_DELETE_USER_FAILURE

public static final MsgType CA_DELETE_USER_FAILURE
If the user has not been deleted.


CA_DELETE_GROUP

public static final MsgType CA_DELETE_GROUP
If a user tries to delete a user group.


CA_DELETE_GROUP_SUCCESS

public static final MsgType CA_DELETE_GROUP_SUCCESS
If the user group has been deleted successfully.


CA_DELETE_GROUP_FAILURE

public static final MsgType CA_DELETE_GROUP_FAILURE
If the user group has not been deleted.


CA_ADD_USER_TO_GROUP

public static final MsgType CA_ADD_USER_TO_GROUP
If the owner of a user group tries to inviate a user to join his user group.


CA_ADD_USER_TO_GROUP_SUCCESS

public static final MsgType CA_ADD_USER_TO_GROUP_SUCCESS
If a user is invited to join a user group successfully.


CA_ADD_USER_TO_GROUP_FAILURE

public static final MsgType CA_ADD_USER_TO_GROUP_FAILURE
If a user cannot be invited into a user group.


CA_GET_GROUPLIST

public static final MsgType CA_GET_GROUPLIST
When the certificate authority tries to get the group list from a user.


CA_GET_GROUPLIST_SUCCESS

public static final MsgType CA_GET_GROUPLIST_SUCCESS
If get the group list successfully.


CA_GET_GROUPLIST_FAILURE

public static final MsgType CA_GET_GROUPLIST_FAILURE
If get the group list failure.


CA_GET_USERLIST

public static final MsgType CA_GET_USERLIST
When the certificate authority tries to get all users in a certain user group.


CA_GET_USERLIST_SUCCESS

public static final MsgType CA_GET_USERLIST_SUCCESS
If all users in a certain user group are obtained successfully.


CA_GET_USERLIST_FAILURE

public static final MsgType CA_GET_USERLIST_FAILURE
If all users in a certain user group cannot be obtained.


CA_LEAVE

public static final MsgType CA_LEAVE
When the certificate authority leaves the system.


database

public static final MsgType database

DB_INSERT_RANGE_INDEX

public static final MsgType DB_INSERT_RANGE_INDEX
insert range index of a table


DB_INSERT_TUPLE_INDEX

public static final MsgType DB_INSERT_TUPLE_INDEX
insert tuple index of a table


DB_INDEX_NOTIFICATION

public static final MsgType DB_INDEX_NOTIFICATION
insert new tuple index


DB_QUERY

public static final MsgType DB_QUERY
relational query


DB_QUERY_RESULT

public static final MsgType DB_QUERY_RESULT
query result


PROJECT_MYMESSAGE

public static final MsgType PROJECT_MYMESSAGE
This message is only for demonstration *


erp_message

public static final MsgType erp_message

ERP_INSERT_TABLE_INDEX

public static final MsgType ERP_INSERT_TABLE_INDEX
to insert table index


ERP_INSERT_COLUMN_INDEX

public static final MsgType ERP_INSERT_COLUMN_INDEX
to insert column index


ERP_INSERT_DATA_INDEX

public static final MsgType ERP_INSERT_DATA_INDEX
to insert data index


ERP_DELETE_TABLE_INDEX

public static final MsgType ERP_DELETE_TABLE_INDEX
to delete table index


ERP_DELETE_COLUMN_INDEX

public static final MsgType ERP_DELETE_COLUMN_INDEX
to delete column index


ERP_DELETE_DATA_INDEX

public static final MsgType ERP_DELETE_DATA_INDEX
to delete data index


ERP_UPDATE_COLUMN_INDEX

public static final MsgType ERP_UPDATE_COLUMN_INDEX
to delete column index


ERP_UPDATE_DATA_INDEX

public static final MsgType ERP_UPDATE_DATA_INDEX
to update data index


access_control

public static final MsgType access_control

ACCESS_CONTROL_ROLE_REQUEST

public static final MsgType ACCESS_CONTROL_ROLE_REQUEST
normal peer request for role-setting update


ACCESS_CONTROL_ROLE_RESULT

public static final MsgType ACCESS_CONTROL_ROLE_RESULT
bootstrap peer respond to role-setting update


ACCESS_CONTROL_BOOTSTRAP_USER_UPDATE

public static final MsgType ACCESS_CONTROL_BOOTSTRAP_USER_UPDATE
bootstrap peer's message of user update


ACCESS_CONTROL_NORMAL_PEER_USER_UPDATE

public static final MsgType ACCESS_CONTROL_NORMAL_PEER_USER_UPDATE
normal peer's message of user update


index_search

public static final MsgType index_search

TABLE_INDEX_SEARCH

public static final MsgType TABLE_INDEX_SEARCH

TABLE_INDEX_SEARCH_RESULT

public static final MsgType TABLE_INDEX_SEARCH_RESULT

QUERY_PEER

public static final MsgType QUERY_PEER

QUERY_PEER_RESULT

public static final MsgType QUERY_PEER_RESULT

COLUMN_INDEX_SEARCH

public static final MsgType COLUMN_INDEX_SEARCH

query_result

public static final MsgType query_result

TABLE_RETRIEVAL

public static final MsgType TABLE_RETRIEVAL

TABLE_DATA

public static final MsgType TABLE_DATA

DEFAULT

public static final MsgType DEFAULT
the default and empty message type and no action should be responsible for processing this message

Method Detail

values

public static final MsgType[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(MsgType c : MsgType.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static MsgType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name

getValue

public int getValue()
Get the value of the message type.

Returns:
the value of the message type

checkValue

public static boolean checkValue(int msgType)
Check if the message type exists.

Parameters:
msgType - the message type
Returns:
true if exists; otherwise, false

description

public static java.lang.String description(int msgType)
Get the description of the MsgType.

Parameters:
msgType - the message type
Returns:
the string used for describing the MsgType