se.sics.tasim.props
Class StartInfo

java.lang.Object
  extended by se.sics.tasim.props.SimpleContent
      extended by se.sics.tasim.props.StartInfo
All Implemented Interfaces:
java.io.Serializable, Transportable

public class StartInfo
extends SimpleContent

StartInfo holds information about a game / simulation. It is sent (wrapped in a Message) to all participating agents in the beginning of a game.

Warning: serialized objects of this class might not be compatible with future versions. Only use serialization of this class for temporary storage or RMI using the same version of the class.

See Also:
Serialized Form

Constructor Summary
StartInfo()
           
StartInfo(int simulationID, long startTime, int simulationLength, int secondsPerDay)
           
 
Method Summary
 long getEndTime()
           
 int getNumberOfDays()
          Returns the number of days in the simulation.
 int getSecondsPerDay()
          Returns the length of each simulated day in seconds.
 int getSimulationID()
          Returns the id of the simulation.
 int getSimulationLength()
          Returns the length of the simulation in milliseconds.
 long getStartTime()
           
 java.lang.String getTransportName()
          Returns the transport name used for externalization.
 void read(TransportReader reader)
          Reads the state for this transportable from the specified reader.
 java.lang.String toString()
           
 void write(TransportWriter writer)
          Writes the state for this transportable to the specified writer.
 
Methods inherited from class se.sics.tasim.props.SimpleContent
getAttribute, getAttribute, getAttributeAsFloat, getAttributeAsInt, getAttributeAsLong, isLocked, lock, params, removeAttribute, setAttribute, setAttribute, setAttribute, setAttribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StartInfo

public StartInfo()

StartInfo

public StartInfo(int simulationID,
                 long startTime,
                 int simulationLength,
                 int secondsPerDay)
Method Detail

getSimulationID

public int getSimulationID()
Returns the id of the simulation.


getStartTime

public long getStartTime()

getEndTime

public long getEndTime()

getSimulationLength

public int getSimulationLength()
Returns the length of the simulation in milliseconds.


getSecondsPerDay

public int getSecondsPerDay()
Returns the length of each simulated day in seconds.


getNumberOfDays

public int getNumberOfDays()
Returns the number of days in the simulation.


toString

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

getTransportName

public java.lang.String getTransportName()
Returns the transport name used for externalization.


read

public void read(TransportReader reader)
          throws java.text.ParseException
Description copied from interface: Transportable
Reads the state for this transportable from the specified reader.

Specified by:
read in interface Transportable
Overrides:
read in class SimpleContent
Parameters:
reader - the reader to read data from
Throws:
java.text.ParseException - if a parse error occurs

write

public void write(TransportWriter writer)
Description copied from interface: Transportable
Writes the state for this transportable to the specified writer.

Specified by:
write in interface Transportable
Overrides:
write in class SimpleContent
Parameters:
writer - the writer to write data to


Copyright © 2007-2009 Association for Trading Agent Research. All Rights Reserved.