uk.ac.vamsas.client.picking
Class Message

java.lang.Object
  extended byuk.ac.vamsas.client.picking.Message
Direct Known Subclasses:
CustomMessage, MouseOverMessage, SelectionMessage

public abstract class Message
extends java.lang.Object

Abstract base class for all message types supported by the picking API.


Field Summary
protected  java.lang.String message
           
 
Constructor Summary
protected Message()
          Constructs a new message.
 
Method Summary
 boolean equals(Message msg)
          compare the on-wire message content of the given message to this.
 java.lang.String getRawMessage()
          Returns the raw message content as a string.
 void validate()
          Test consistence of a Message class implementation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

message

protected java.lang.String message
Constructor Detail

Message

protected Message()
Constructs a new message.

Method Detail

getRawMessage

public java.lang.String getRawMessage()
Returns the raw message content as a string.

Returns:
the raw message content as a string

equals

public boolean equals(Message msg)
compare the on-wire message content of the given message to this.

Parameters:
msg -
Returns:
true if message content is equal

validate

public void validate()
Test consistence of a Message class implementation. This method throws an error if the message object cannot be parsed into another instance of the same object by invoking the MessageImpl(String this.getRawMessage()) constructor or that newinstance.getRawMessage != this.getRawMessage