se.sics.tasim.props
Class AdminContent

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

public class AdminContent
extends SimpleContent

AdminContent is used for administrative communication with the server. A few examples of its usage:

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

Field Summary
static int AUTH
           
static int ERROR
           
static int JOIN_SIMULATION
           
static int NEXT_SIMULATION
           
static int NO_ERROR
          Error types
static int NO_SIMULATION_CREATED
           
static int NONE
          Administration types
static int NOT_AUTH
           
static int NOT_SUPPORTED
           
static int PING
           
static int PONG
           
static int QUIT
           
static int SERVER_TIME
           
 
Constructor Summary
AdminContent()
           
AdminContent(int type)
           
AdminContent(int type, int error)
           
AdminContent(int type, int error, java.lang.String errorReason)
           
 
Method Summary
static Context createContext()
           
 int getError()
           
static java.lang.String getErrorAsString(int errorType)
           
 java.lang.String getErrorReason()
           
 java.lang.String getTransportName()
          Returns the transport name used for externalization.
 int getType()
           
static java.lang.String getTypeAsString(int type)
           
 boolean isError()
           
 void read(TransportReader reader)
          Reads the state for this transportable from the specified reader.
 void setError(int error)
           
 void setError(int error, java.lang.String errorReason)
           
 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
 

Field Detail

NONE

public static final int NONE
Administration types

See Also:
Constant Field Values

ERROR

public static final int ERROR
See Also:
Constant Field Values

PING

public static final int PING
See Also:
Constant Field Values

PONG

public static final int PONG
See Also:
Constant Field Values

AUTH

public static final int AUTH
See Also:
Constant Field Values

SERVER_TIME

public static final int SERVER_TIME
See Also:
Constant Field Values

NEXT_SIMULATION

public static final int NEXT_SIMULATION
See Also:
Constant Field Values

JOIN_SIMULATION

public static final int JOIN_SIMULATION
See Also:
Constant Field Values

QUIT

public static final int QUIT
See Also:
Constant Field Values

NO_ERROR

public static final int NO_ERROR
Error types

See Also:
Constant Field Values

NOT_SUPPORTED

public static final int NOT_SUPPORTED
See Also:
Constant Field Values

NOT_AUTH

public static final int NOT_AUTH
See Also:
Constant Field Values

NO_SIMULATION_CREATED

public static final int NO_SIMULATION_CREATED
See Also:
Constant Field Values
Constructor Detail

AdminContent

public AdminContent()

AdminContent

public AdminContent(int type)

AdminContent

public AdminContent(int type,
                    int error)

AdminContent

public AdminContent(int type,
                    int error,
                    java.lang.String errorReason)
Method Detail

createContext

public static Context createContext()

getTypeAsString

public static java.lang.String getTypeAsString(int type)

getErrorAsString

public static java.lang.String getErrorAsString(int errorType)

getType

public int getType()

isError

public boolean isError()

getError

public int getError()

getErrorReason

public java.lang.String getErrorReason()

setError

public void setError(int error)

setError

public void setError(int error,
                     java.lang.String errorReason)

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.