All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class macondo.mak.Place

macondo.mak.Place

public class Place

Constructor Index

 o Place()
 o Place(String)

Method Index

 o flushAgent(Agent, Object)
 o getPlaceName()
 o getProperty(String)
Returns a system property.
 o handleConnection(Socket)
Handles a connection which requests a service.
 o launchAgent(Agent)
Launchs the given agent.
 o launchAgent(String)
Launchs an agent given its file name.
 o main(String[])
Main entry point when Place is used as a standalone application.
 o restoreAgent(Object)
 o run()
Place main loop: accepts requests and serve each one in a separate thread.
 o saveAgent(Agent, Object)
 o saveAgent(String)
 o setHostName(String)
Sets the host name of this Place.
 o setName(String)
Sets the application dependent name of this Place.
 o setPort(int)
Sets the port number of this Place.
 o startPlace()

Constructors

 o Place
 public Place()
 o Place
 public Place(String name)

Methods

 o main
 public static void main(String args[])
Main entry point when Place is used as a standalone application.

Parameters:
args - command line arguments
 o getProperty
 public String getProperty(String key)
Returns a system property.

Returns:
a system property.
 o flushAgent
 public final void flushAgent(Agent agent,
                              Object key) throws IOException
 o saveAgent
 public final void saveAgent(Agent agent,
                             Object key) throws IOException
 o saveAgent
 public final void saveAgent(String agent_name) throws IOException
 o restoreAgent
 public final Agent restoreAgent(Object key) throws IOException, ClassNotFoundException
 o startPlace
 public void startPlace()
 o run
 public final void run()
Place main loop: accepts requests and serve each one in a separate thread.

 o setHostName
 public final void setHostName(String host)
Sets the host name of this Place.

Parameters:
host - the host name of this Place.
 o setPort
 public void setPort(int port)
Sets the port number of this Place.

Parameters:
port - the port number.
 o setName
 public final void setName(String name)
Sets the application dependent name of this Place.

Parameters:
name - the application dependant name of this Place.
 o getPlaceName
 public final PlaceName getPlaceName()
 o launchAgent
 public void launchAgent(String agent_name) throws Exception
Launchs an agent given its file name. This is a useful for agents specified at the command line.

Parameters:
agent_name - the file name of the agent to launch.
Throws: Exception
thrown if agent can't be launched.
 o launchAgent
 public void launchAgent(Agent agent) throws Exception
Launchs the given agent.

Parameters:
agent_name - the file name of the agent to launch.
Throws: Exception
thrown if agent can't be launched.
 o handleConnection
 protected void handleConnection(Socket socket)
Handles a connection which requests a service. A separate thread is spawned to manage the connection.

Parameters:
socket - the connection socket.

All Packages  Class Hierarchy  This Package  Previous  Next  Index