cz.cuni.amis.pogamut.usar2004.agent.module.response
Class SuperResponse

Package class diagram package SuperResponse
java.lang.Object
  extended by cz.cuni.amis.pogamut.usar2004.agent.module.response.SuperResponse
Direct Known Subclasses:
ResponseCamera, ResponseSensorEffecter, Viewport

public abstract class SuperResponse
extends Object

Parent class for all possible response messages. It covers the basic and common properties for all the response subjects.

Author:
vejmanm

Field Summary
protected  ResponseMessage lastMessage
           
protected  ResponseType type
           
 
Constructor Summary
SuperResponse(ResponseType type)
          Ctor.
 
Method Summary
 ResponseType getResponseType()
          ResponseType is a descriptor used for creating particular instance and for getting type information about particular response message.
 double getTime()
          Timestamp form the UT since server start in seconds.
 String getType()
          Type of the response will be one of the following: "ViewPorts”, “Camera”, or some type of sensor or effecter.
 Boolean isReady()
          Used to make sure the object is filled.
 void updateMessage(ResponseMessage message)
          Method used for updating the message object that provides particular properties for given type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lastMessage

protected ResponseMessage lastMessage

type

protected ResponseType type
Constructor Detail

SuperResponse

public SuperResponse(ResponseType type)
Ctor.

Parameters:
type - Response type describes particular subject about which we want to know about. It is used to distinguish incoming message from the server.
Method Detail

isReady

public Boolean isReady()
Used to make sure the object is filled.

Returns:
Returns true if the object is filled with Resp. message.

getTime

public double getTime()
Timestamp form the UT since server start in seconds.

Returns:
Returns seconds elapsed from the start of the server.

getType

public String getType()
Type of the response will be one of the following: "ViewPorts”, “Camera”, or some type of sensor or effecter.

Returns:
Returns Type of the response.

getResponseType

public ResponseType getResponseType()
ResponseType is a descriptor used for creating particular instance and for getting type information about particular response message.

Returns:
Returns ResponseType.

updateMessage

public void updateMessage(ResponseMessage message)
Method used for updating the message object that provides particular properties for given type. Note that this object is created by yylex parser and contains properties for all configuration subject types. But only relevat to individual Response Subject are filled.

Parameters:
message - Response message from server.


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