org.alicebot.server.core
Class BotProcesses

java.lang.Object
  extended by org.alicebot.server.core.BotProcesses

public class BotProcesses
extends java.lang.Object

Controls processes that run in separate threads and need to be shut down before the bot exits.


Method Summary
static BotProcess get(java.lang.String name)
          Returns a given process.
static java.util.Iterator getRegistryIterator()
          Returns an iterator on the registry.
static void shutdownAll()
          Shuts down all registered processes.
static void start(BotProcess process, java.lang.String name)
          Adds a process to the registry and starts it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

start

public static void start(BotProcess process,
                         java.lang.String name)
Adds a process to the registry and starts it.

Parameters:
process - the process to add
name - a name by which its thread will be identified

getRegistryIterator

public static java.util.Iterator getRegistryIterator()
Returns an iterator on the registry.

Returns:
an iterator on the registry

get

public static BotProcess get(java.lang.String name)
Returns a given process.

Parameters:
name - the name of the process
Returns:
the process assigned to the name

shutdownAll

public static void shutdownAll()
Shuts down all registered processes.