cz.cuni.amis.pogamut.ut2004.teamcomm.mina.messages
Class TCMessage

Package class diagram package TCMessage
java.lang.Object
  extended by cz.cuni.amis.pogamut.ut2004.teamcomm.mina.messages.TCMessage
All Implemented Interfaces:
cz.cuni.amis.pogamut.base.communication.translator.event.IWorldChangeEvent, cz.cuni.amis.pogamut.base.communication.worldview.event.IWorldEvent, cz.cuni.amis.utils.listener.Event, Serializable
Direct Known Subclasses:
TCInfoMessage, TCRequestMessage

public class TCMessage
extends Object
implements cz.cuni.amis.pogamut.base.communication.translator.event.IWorldChangeEvent, cz.cuni.amis.pogamut.base.communication.worldview.event.IWorldEvent, Serializable

See Also:
Serialized Form

Constructor Summary
TCMessage(cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId source, TCRecipient target, cz.cuni.amis.utils.token.IToken messageType, Serializable message, long simTime)
           
 
Method Summary
 int getChannelId()
           
 Serializable getData()
           
 Serializable getMessage()
          Attempts to deserialize messageData and returns them.
 cz.cuni.amis.utils.token.IToken getMessageType()
           
 long getSimTime()
           
 cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId getSource()
           
 TCRecipient getTarget()
           
 cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId getTargetId()
           
 boolean isMessageType(cz.cuni.amis.utils.token.IToken type)
           
 boolean isMessageType(String type)
           
 boolean isResolved()
          CLIENT SUPPORT for implementation of TCMessage filters, you can check whether this message has already been resolved by other filter.
 boolean isTarget(TCRecipient target)
           
 void markResolved()
          CLIENT SUPPORT for implementation of TCMessage filters, you can mark this message as "resolved" within your logic to let your further filters know it was handled...
 void setChannelId(int channelId)
           
 void setTargetId(cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId targetId)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TCMessage

public TCMessage(cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId source,
                 TCRecipient target,
                 cz.cuni.amis.utils.token.IToken messageType,
                 Serializable message,
                 long simTime)
Method Detail

getMessageType

public cz.cuni.amis.utils.token.IToken getMessageType()

isMessageType

public boolean isMessageType(String type)

isMessageType

public boolean isMessageType(cz.cuni.amis.utils.token.IToken type)

getMessage

public Serializable getMessage()
                        throws cz.cuni.amis.utils.exception.PogamutException
Attempts to deserialize messageData and returns them. Throws PogamutException if unsuccessful.

Returns:
Throws:
cz.cuni.amis.utils.exception.PogamutException

getData

public Serializable getData()

getTarget

public TCRecipient getTarget()

isTarget

public boolean isTarget(TCRecipient target)

getSource

public cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId getSource()

getChannelId

public int getChannelId()

setChannelId

public void setChannelId(int channelId)

getTargetId

public cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId getTargetId()

setTargetId

public void setTargetId(cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId targetId)

isResolved

public boolean isResolved()
CLIENT SUPPORT for implementation of TCMessage filters, you can check whether this message has already been resolved by other filter.

Returns:

markResolved

public void markResolved()
CLIENT SUPPORT for implementation of TCMessage filters, you can mark this message as "resolved" within your logic to let your further filters know it was handled...


getSimTime

public long getSimTime()
Specified by:
getSimTime in interface cz.cuni.amis.pogamut.base.communication.translator.event.IWorldChangeEvent
Specified by:
getSimTime in interface cz.cuni.amis.pogamut.base.communication.worldview.event.IWorldEvent

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.