se.sics.tasim.sim
Class Admin

java.lang.Object
  extended by se.sics.tasim.sim.Admin

public final class Admin
extends java.lang.Object


Field Summary
static java.lang.String ADMIN
          The address of the administration unit in the simulation server
static java.lang.String CONF
           
static java.lang.String SERVER_VERSION
          Version information for the server
 
Constructor Summary
Admin(ConfigManager config)
          Creates a new Admin instance.
 
Method Summary
 ConfigManager getConfig()
           
 java.lang.String getConfigDirectory()
           
 EventWriter getEventWriter()
           
 InfoConnection getInfoConnection()
           
 java.lang.String getServerName()
           
 long getServerTime()
           
 long getServerTimeSeconds()
           
 java.lang.String getUserName(int userID)
           
 SimulationInfo joinSimulation(int userID, java.lang.String simType, java.lang.String simParams, java.lang.String simRoleName)
          Joins the specified agent to a simulation of the specified type.
 SimulationInfo nextSimulation(int userID, java.lang.String simTypePattern)
           
 void setServerTime(long serverTime)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVER_VERSION

public static final java.lang.String SERVER_VERSION
Version information for the server

See Also:
Constant Field Values

CONF

public static final java.lang.String CONF
See Also:
Constant Field Values

ADMIN

public static final java.lang.String ADMIN
The address of the administration unit in the simulation server

See Also:
Constant Field Values
Constructor Detail

Admin

public Admin(ConfigManager config)
      throws IllegalConfigurationException,
             java.io.IOException
Creates a new Admin instance.

Parameters:
config - the configuration to use
Throws:
IllegalConfigurationException - if a configuration error is detected
java.io.IOException - if an IO error occurs during setup
Method Detail

getConfig

public ConfigManager getConfig()

getServerName

public java.lang.String getServerName()

getConfigDirectory

public java.lang.String getConfigDirectory()

getEventWriter

public EventWriter getEventWriter()

getServerTime

public long getServerTime()

getServerTimeSeconds

public long getServerTimeSeconds()

setServerTime

public void setServerTime(long serverTime)

getUserName

public java.lang.String getUserName(int userID)

nextSimulation

public SimulationInfo nextSimulation(int userID,
                                     java.lang.String simTypePattern)

joinSimulation

public SimulationInfo joinSimulation(int userID,
                                     java.lang.String simType,
                                     java.lang.String simParams,
                                     java.lang.String simRoleName)
                              throws NoSuchManagerException
Joins the specified agent to a simulation of the specified type. Returns the simulation where the agent joined, creating new simulations as needed. Returns information about the joined simulations. Note: the returned simulation info might not have been locked yet i.e. is still missing simulation id.

Parameters:
userID - the agent to join a simulation
simType - the type of the simulation to join
simParams - parameters for the simulation
simRoleName - the role of the agent to join
Returns:
information about the joined simulation
Throws:
NoSuchManagerException - if no manager for the type of simulation could be found

getInfoConnection

public InfoConnection getInfoConnection()


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