Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

arch.message
Class JXMessage  view JXMessage download JXMessage.java

java.lang.Object
  extended byarch.message.JXMessage

public abstract class JXMessage
extends java.lang.Object

JXMessage provides a generic message passing facility in the desktop system. It does not interpret the message passed but ensures that a set of common methods are provided such that different modules can talk to each other by passing the correct message objects that they understand internally within the recieving module. In order for the project team and independent developers to coordinate on a possible data object understood system wide, the JXMessage was developed. This class is designed for inheritance. The contract both explicitly and implicitly defined for all of its subclasses MUST be adhered to strictly, in order to assure compliance of the desktop system. Note that all the possible methods that maybe used by its subclass constructors and are not allowed to be overridden are made declared as final.

Since:
JD4X 1.0
Version:
0.1, 16/05/2002

Field Summary
private  int hValue
          Cached hash value
private  java.lang.Object message
          The message object to be passed.
 
Constructor Summary
protected JXMessage()
          Only a subclass is allowed to create an instance of it.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compare two messages for equality.
 java.lang.Object getMessage()
          Provides a general way to pass message objects to its clients.
 int hashCode()
          The hash function merely returns the hash value computered by the message object and zero if the message is null.
protected  void setMessage(java.lang.Object obj)
          Provides a restricted way to set generic message objects.
 java.lang.String toString()
          A string representation of this message.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

message

private java.lang.Object message
The message object to be passed.


hValue

private int hValue
Cached hash value

Constructor Detail

JXMessage

protected JXMessage()
Only a subclass is allowed to create an instance of it. This class is designed for inheritance and no direct instantiation is allowed. This constructor is provided for future serialization of subclasses.

Method Detail

equals

public boolean equals(java.lang.Object obj)
Compare two messages for equality. Two messages are considered equal if their message objects are equal. This method merely calls the message object's equals method and assumes that the message object has its own way of determining equality. Subclasses should consider overridding it.


getMessage

public final java.lang.Object getMessage()
Provides a general way to pass message objects to its clients.


hashCode

public int hashCode()
The hash function merely returns the hash value computered by the message object and zero if the message is null. Subclasses should consider overridding it.


setMessage

protected final void setMessage(java.lang.Object obj)
Provides a restricted way to set generic message objects.


toString

public java.lang.String toString()
A string representation of this message. This method merely calls the message object's toString method and assumes that the message object has a correct string representation of itself. The exact details of the representation are unspecified and subject to change, but the following maybe regarded as typical: Message: Thread termination is rejected.