|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object pluginCore.Message
public class Message
The base object for communication between plugins.
Field Summary | |
---|---|
Object |
anObject
An object that is to be sent to another plug-in. |
int |
destID
The id of the plug-in that is to receive this message. |
int |
intMessage
The integer value of a message in the protocol defined by 'protocol'. |
Message |
next
Used when plug-ins wish to store linked lists of messages. |
int |
protocol
The protocol that is being used for this communication. |
static int |
PROTOCOL_A
Communication protocol A. |
static int |
PROTOCOL_B
Communication protocol B. |
static int |
PROTOCOL_C
Communication protocol C. |
int |
sourceID
The id of the plug-in that sent this message. |
Constructor Summary | |
---|---|
Message()
Blank constructor, ever value is set to 0. |
|
Message(int srcID,
int deID,
int proto,
int msg)
Constructor for regular Message. |
|
Message(int srcID,
int destID,
int proto,
int msg,
Object par)
Constructor for regular Message with object parameters. |
Method Summary | |
---|---|
Object |
getAnObject()
Gets the Object that was carried by the Message. |
int |
getDest()
Gets the destination plug-in Id. |
int |
getIntMessage()
Gets the integer message. |
Message |
getNextMessage()
Gets the next Message. |
int |
getProtocol()
Gets the message protocol. |
int |
getSource()
Gets the source plug-in Id. |
void |
setAnObject(Object objIn)
Sets the Object array that will be carried by the Message. |
void |
setDest(int newDest)
Sets the destination plug-in Id. |
void |
setIntMessage(int msgIn)
Sets the integer message. |
void |
setNextMessage(Message messIn)
Sets the next Message. |
void |
setProtocol(int proto)
Sets the message protocol. |
void |
setSource(int newSource)
Sets the source plug-in Id. |
String |
toString()
Returns a String representation of this object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int PROTOCOL_A
public static final int PROTOCOL_B
public static final int PROTOCOL_C
public int sourceID
public int destID
public int protocol
public int intMessage
public Object anObject
public Message next
Constructor Detail |
---|
public Message()
public Message(int srcID, int deID, int proto, int msg)
srcID
- The id of the originating plug-in.deID
- The id of the destination plug-in.proto
- The protocol with which this message is communicating.msg
- The integer value of the message.public Message(int srcID, int destID, int proto, int msg, Object par)
srcID
- The id of the originating plug-in.destID
- The id of the destination plug-in.proto
- The protocol with which this message is communicating.msg
- The integer value of the message.par
- The Object payload of the message.Method Detail |
---|
public void setDest(int newDest)
newDest
- The destination plug-in Id.public int getDest()
public void setSource(int newSource)
newSource
- The source plug-in Id.public int getSource()
public void setAnObject(Object objIn)
objIn
- An array of objects to be sent with the Message.public Object getAnObject()
public void setIntMessage(int msgIn)
msgIn
- The integer message.public int getIntMessage()
public void setProtocol(int proto)
proto
- The message protocol.public int getProtocol()
public void setNextMessage(Message messIn)
messIn
- The next message in the linked list.public Message getNextMessage()
public String toString()
toString
in class Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |