jgnash.message
Class Message

java.lang.Object
  extended by jgnash.message.Message
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class Message
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

Message object

Version:
$Id$
Author:
Craig Cavanaugh
See Also:
Serialized Form

Field Summary
private  MessageChannel channel
           
private  ChannelEvent event
           
private  java.util.EnumMap<MessageProperty,StoredObject> properties
           
private  boolean remote
          Used to flag message sent remotely
private static long serialVersionUID
           
private  java.lang.String source
           
 
Constructor Summary
  Message()
          Deprecated.  
  Message(MessageChannel channel, ChannelEvent event, Engine source)
           
private Message(MessageChannel channel, ChannelEvent event, java.lang.String source)
           
 
Method Summary
 Message clone()
           
 MessageChannel getChannel()
           
 ChannelEvent getEvent()
           
 java.lang.Object getObject(MessageProperty key)
           
 java.lang.String getSource()
           
 boolean isRemote()
           
private  void readObject(java.io.ObjectInputStream s)
          Read a Message from an ObjectInputStream
 void setObject(MessageProperty key, StoredObject value)
           
 void setRemote(boolean remote)
           
private  void writeObject(java.io.ObjectOutputStream s)
          Write message out to ObjectOutputStream.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

event

private ChannelEvent event

channel

private MessageChannel channel

source

private java.lang.String source

properties

private transient java.util.EnumMap<MessageProperty,StoredObject> properties

remote

private transient boolean remote
Used to flag message sent remotely

Constructor Detail

Message

@Deprecated
public Message()
Deprecated. 

No argument constructor for reflection purposes.
Do not use to create new instances


Message

public Message(MessageChannel channel,
               ChannelEvent event,
               Engine source)

Message

private Message(MessageChannel channel,
                ChannelEvent event,
                java.lang.String source)
Method Detail

getChannel

public MessageChannel getChannel()

getEvent

public ChannelEvent getEvent()

setObject

public void setObject(MessageProperty key,
                      StoredObject value)

getObject

public java.lang.Object getObject(MessageProperty key)

getSource

public java.lang.String getSource()

setRemote

public void setRemote(boolean remote)

isRemote

public boolean isRemote()

writeObject

private void writeObject(java.io.ObjectOutputStream s)
                  throws java.io.IOException
Write message out to ObjectOutputStream.

Parameters:
s - stream
Throws:
java.io.IOException - io exception

readObject

private void readObject(java.io.ObjectInputStream s)
                 throws java.io.IOException,
                        java.lang.ClassNotFoundException
Read a Message from an ObjectInputStream

Parameters:
s - input stream
Throws:
java.io.IOException - io exception
java.lang.ClassNotFoundException - thrown is class is not found

clone

public Message clone()
Overrides:
clone in class java.lang.Object