se.sics.tasim.props
Class SimpleContent
java.lang.Object
se.sics.tasim.props.SimpleContent
- All Implemented Interfaces:
- java.io.Serializable, Transportable
- Direct Known Subclasses:
- AdminContent, ServerConfig, SimulationStatus, StartInfo
public abstract class SimpleContent
- extends java.lang.Object
- implements Transportable, java.io.Serializable
SimpleContent
is an abstract base class for parameterized
messages. It provides functionality for setting and getting named attributes.
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleContent
protected SimpleContent()
getAttribute
public java.lang.String getAttribute(java.lang.String name)
getAttribute
public java.lang.String getAttribute(java.lang.String name,
java.lang.String defaultValue)
getAttributeAsInt
public int getAttributeAsInt(java.lang.String name,
int defaultValue)
getAttributeAsLong
public long getAttributeAsLong(java.lang.String name,
long defaultValue)
getAttributeAsFloat
public float getAttributeAsFloat(java.lang.String name,
float defaultValue)
setAttribute
public void setAttribute(java.lang.String name,
java.lang.String value)
setAttribute
public void setAttribute(java.lang.String name,
int value)
setAttribute
public void setAttribute(java.lang.String name,
long value)
setAttribute
public void setAttribute(java.lang.String name,
float value)
removeAttribute
public void removeAttribute(java.lang.String name)
isLocked
public boolean isLocked()
lock
public void lock()
params
protected java.lang.StringBuffer params(java.lang.StringBuffer buf)
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
- 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
- Parameters:
writer
- the writer to write data to
Copyright © 2007-2009 Association for Trading Agent Research. All Rights Reserved.