cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages
Class AliveMessageCompositeImpl

java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.InfoMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.AliveMessage
          extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.AliveMessageCompositeImpl
All Implemented Interfaces:
IWorldChangeEvent, IWorldEvent, IWorldObject, ICompositeWorldObject, Event

public class AliveMessageCompositeImpl
extends AliveMessage

Composite implementation of the ALIVE abstract message. It wraps Local/Shared/Static parts in single object allowing to presenting a nice facade for users.

Complete message documentation: Synchronous message. Alive message are for confirmation, that the connection is still working. They are sent periodically with usual period of one second (this can change depending on the configuration of ControlServer)


Nested Class Summary
 
Nested classes/interfaces inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.AliveMessage
AliveMessage.AliveMessageUpdate
 
Field Summary
protected  AliveMessageLocalImpl partLocal
           
protected  AliveMessageStaticImpl partStatic
           
 
Fields inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.AliveMessage
AliveMessageId, PROTOTYPE, SimTime
 
Constructor Summary
AliveMessageCompositeImpl()
          Parameter-less contructor for the message.
AliveMessageCompositeImpl(AliveMessageCompositeImpl original)
          Cloning constructor.
AliveMessageCompositeImpl(AliveMessageLocalImpl partLocal, AliveMessageSharedImpl partShared, AliveMessageStaticImpl partStatic)
          Composite-impl constructor.
 
Method Summary
 UnrealId getId()
          Returns an id of the object that is unique among all world objects.
 AliveMessageLocal getLocal()
           
 AliveMessageShared getShared()
           
 AliveMessageStatic getStatic()
           
 double getTime()
          Game time when this message was send.
 void setSimTime(long SimTime)
          Used by Yylex to slip correct time of the object or programmatically.
 java.lang.String toHtmlString()
           
 java.lang.String toString()
           
 
Methods inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.AliveMessage
getSimTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

partStatic

protected AliveMessageStaticImpl partStatic

partLocal

protected AliveMessageLocalImpl partLocal
Constructor Detail

AliveMessageCompositeImpl

public AliveMessageCompositeImpl()
Parameter-less contructor for the message.


AliveMessageCompositeImpl

public AliveMessageCompositeImpl(AliveMessageLocalImpl partLocal,
                                 AliveMessageSharedImpl partShared,
                                 AliveMessageStaticImpl partStatic)
Composite-impl constructor. It assembles the message from its three fragments - local/shared/static.

Parameters:
partLocal - local-part of the message
partShared - shared-part of the message
partStatic - static-part of the message

AliveMessageCompositeImpl

public AliveMessageCompositeImpl(AliveMessageCompositeImpl original)
Cloning constructor.

Parameters:
original -
Method Detail

getId

public UnrealId getId()
Description copied from interface: IWorldObject
Returns an id of the object that is unique among all world objects.

Specified by:
getId in interface IWorldObject
Overrides:
getId in class AliveMessage
Returns:

setSimTime

public void setSimTime(long SimTime)
Description copied from class: AliveMessage
Used by Yylex to slip correct time of the object or programmatically.

Overrides:
setSimTime in class AliveMessage

getStatic

public AliveMessageStatic getStatic()

getLocal

public AliveMessageLocal getLocal()

getShared

public AliveMessageShared getShared()

getTime

public double getTime()
Description copied from class: AliveMessage
Game time when this message was send.

Specified by:
getTime in class AliveMessage

toString

public java.lang.String toString()
Overrides:
toString in class AliveMessage

toHtmlString

public java.lang.String toHtmlString()
Overrides:
toHtmlString in class AliveMessage