org.jdesktop.wonderland.server.cell
Class AbstractComponentMessageReceiver

java.lang.Object
  extended by org.jdesktop.wonderland.server.cell.AbstractComponentMessageReceiver
All Implemented Interfaces:
java.io.Serializable, ChannelComponentMO.ComponentMessageReceiver

public abstract class AbstractComponentMessageReceiver
extends java.lang.Object
implements ChannelComponentMO.ComponentMessageReceiver

An abstract base class that implements the channel component message receiver interface and hides Darkstar implementation details from the developer.

Author:
Jordan Slott
See Also:
Serialized Form

Constructor Summary
AbstractComponentMessageReceiver(CellMO cellMO)
          Constructor, takes the cell associated with the channel component
 
Method Summary
 CellMO getCell()
          Returns the cell associated with this message receiver.
 ChannelComponentMO getChannelComponent()
          Returns the channel component associated with this message receiver.
abstract  void messageReceived(WonderlandClientSender sender, WonderlandClientID clientID, CellMessage message)
           
protected  void postRecordMessage(WonderlandClientSender sender, WonderlandClientID clientID, CellMessage message)
          Subclasses may override this method to perform specialised recordings for their component or cell.
 void recordMessage(WonderlandClientSender sender, WonderlandClientID clientID, CellMessage message)
          Record the message--as part of the event recording mechanism.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractComponentMessageReceiver

public AbstractComponentMessageReceiver(CellMO cellMO)
Constructor, takes the cell associated with the channel component

Method Detail

getCell

public CellMO getCell()
Returns the cell associated with this message receiver.

Returns:
The CellMO

getChannelComponent

public ChannelComponentMO getChannelComponent()
Returns the channel component associated with this message receiver.

Returns:
The ChannelComponentMO

messageReceived

public abstract void messageReceived(WonderlandClientSender sender,
                                     WonderlandClientID clientID,
                                     CellMessage message)
Specified by:
messageReceived in interface ChannelComponentMO.ComponentMessageReceiver

recordMessage

public final void recordMessage(WonderlandClientSender sender,
                                WonderlandClientID clientID,
                                CellMessage message)
Description copied from interface: ChannelComponentMO.ComponentMessageReceiver
Record the message--as part of the event recording mechanism.

Specified by:
recordMessage in interface ChannelComponentMO.ComponentMessageReceiver
Parameters:
sender - the sender of the message
clientID - the id of the client sending the message

postRecordMessage

protected void postRecordMessage(WonderlandClientSender sender,
                                 WonderlandClientID clientID,
                                 CellMessage message)
Subclasses may override this method to perform specialised recordings for their component or cell.

Parameters:
sender - the sender of the message
clientID - the id of the client sending the message
message -


Open Wonderland - http://openwonderland.org