Extension SDK

oracle.ide.addin
Class Message

java.lang.Object
  extended byoracle.ide.addin.Message
Direct Known Subclasses:
UpdateMessage, VetoableMessage

public class Message
extends java.lang.Object

The Message class is the base class for messages send to an Observer to notify it about a Subject pending change and past change. An update message consists of four lists: add, remove, modify, and container lists. A subject simply includes all applicable change information in one or more update messages.

See Also:
Observer, Subject

Field Summary
protected  java.util.List add
          Lists new object creations that may have ocurred during a subject change
protected  java.util.List container
          Lists the parents of objects recorded in add, remove, and/or modify lists
protected  Context context
          Holds the context under which notification is taking place.
protected  java.lang.Object extraData
          Holds a reference to arbitrary user data associated with this message.
protected  int messageID
          records the message id
protected  java.util.List modify
          Lists object modifications that may have ocurred during a subject change
protected  java.lang.Object origin
          records the Object which originated the message
protected  java.util.List remove
          Lists object deletions that may have ocurred during a subject change
 
Constructor Summary
Message(int messageID, java.lang.Object origin)
          Constructs an update message of the specified message id.
 
Method Summary
 java.util.List getAddObjects()
          Retrieves the list of objects added during a Subject change.
 Context getContext()
          Get the context under which notification is taking place.
 java.lang.Object getExtraData()
          Get the user data associated with this message.
 int getMessageID()
          Retrieves the message identifier.
 java.util.List getModifyObjects()
          Retrieves the list of objects modified during a Subject change.
 java.lang.Object getOrigin()
          Retrieves the originator of the message.
 java.util.List getRemoveObjects()
          Retrieves the list of objects removed during a Subject change.
 void setContext(Context context)
          Set the context under which notification is taking place.
 void setExtraData(java.lang.Object extraData)
          Set the user data to be associated with this message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

messageID

protected int messageID
records the message id


origin

protected java.lang.Object origin
records the Object which originated the message


add

protected java.util.List add
Lists new object creations that may have ocurred during a subject change


remove

protected java.util.List remove
Lists object deletions that may have ocurred during a subject change


modify

protected java.util.List modify
Lists object modifications that may have ocurred during a subject change


container

protected java.util.List container
Lists the parents of objects recorded in add, remove, and/or modify lists


context

protected Context context
Holds the context under which notification is taking place.


extraData

protected java.lang.Object extraData
Holds a reference to arbitrary user data associated with this message.

Constructor Detail

Message

public Message(int messageID,
               java.lang.Object origin)
Constructs an update message of the specified message id.

Parameters:
origin - the Object which originated this message. Usually an Observer.
messageID - the message identifier.
Method Detail

getMessageID

public int getMessageID()
Retrieves the message identifier.

Returns:
the message identifier.

getOrigin

public java.lang.Object getOrigin()
Retrieves the originator of the message. Usually an Observer.

Returns:
the originator of the message.

getAddObjects

public java.util.List getAddObjects()
Retrieves the list of objects added during a Subject change.

Returns:
the list of objects added during a Subject change.

getRemoveObjects

public java.util.List getRemoveObjects()
Retrieves the list of objects removed during a Subject change.

Returns:
the list of objects removed during a Subject change.

getModifyObjects

public java.util.List getModifyObjects()
Retrieves the list of objects modified during a Subject change.

Returns:
the list of objects modified during a Subject change.

getContext

public Context getContext()
Get the context under which notification is taking place.


setContext

public void setContext(Context context)
Set the context under which notification is taking place.


getExtraData

public java.lang.Object getExtraData()
Get the user data associated with this message.


setExtraData

public void setExtraData(java.lang.Object extraData)
Set the user data to be associated with this message.


Extension SDK

 

Copyright ©1997, 2003, Oracle. All rights reserved.