public class MicroRuntime
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
AGENTS_KEY
The configuration property key that maps to the list of agents
that have to be activated at boostrap.
|
static java.lang.String |
DEFAULT_SF_TIMEOUT_KEY
The configuration property key that specifies how much time by default a command that is
being delivered during a temporary disconnection must be stored waiting for the FE
to reconnect.
|
static java.lang.String |
HOST_KEY
The configuration property key that maps to the host where to connect to
the JADE mediator.
|
static java.lang.String |
HTTP_PROTOCOL |
static java.lang.String |
HTTPS_PROTOCOL |
static java.lang.String |
OWNER_KEY
The key to retrieve the owner of the starting container.
|
static java.lang.String |
PORT_KEY
The configuration property key that maps to the port where to connect to
the JADE mediator.
|
static java.lang.String |
PROTO_KEY
The configuration property key that maps to the protocol that must be used to connect to
the JADE mediator.
|
static java.lang.String |
REMOTE_CONFIG_HOST_KEY |
static java.lang.String |
REMOTE_CONFIG_PORT_KEY |
static java.lang.String |
SERVICES_KEY
The configuration property key that maps to the list of services
that have to be installed.
|
static java.lang.String |
SOCKET_PROTOCOL |
static java.lang.String |
SSL_PROTOCOL |
Constructor and Description |
---|
MicroRuntime() |
Modifier and Type | Method and Description |
---|---|
static void |
addListener(FEListener l)
Add a listener that will be notified about Front-End relevant events such as
BORN_AGENT and DEAD_AGENT
NOT available in MIDP |
static void |
detach()
Disconnect this front-end container from the platform.
|
static AgentController |
getAgent(java.lang.String localName)
Get agent proxy to local agent given its name.
|
static java.lang.String |
getContainerName() |
static boolean |
isRunning()
Tells whether a JADE Front End container is currently
running within this JVM.
|
static void |
killAgent(java.lang.String name)
Kill an agent.
|
static void |
removeListener(FEListener l)
Remove a listener to Front-End relevant events
BORN_AGENT and DEAD_AGENT
NOT available in MIDP |
static int |
size() |
static void |
startAgent(java.lang.String name,
java.lang.String className,
java.lang.Object[] args)
Start a new agent.
|
static void |
startAgent(java.lang.String name,
java.lang.String className,
java.lang.String[] args)
Start a new agent.
|
static void |
startJADE(Properties p,
java.lang.Runnable r)
Start up the JADE runtime.
|
static void |
stopJADE()
Shut down the JADE runtime.
|
public static final java.lang.String AGENTS_KEY
public static final java.lang.String SERVICES_KEY
public static final java.lang.String OWNER_KEY
public static final java.lang.String HOST_KEY
public static final java.lang.String PORT_KEY
public static final java.lang.String PROTO_KEY
socket, ssl, http, https
public static final java.lang.String DEFAULT_SF_TIMEOUT_KEY
public static final java.lang.String REMOTE_CONFIG_HOST_KEY
public static final java.lang.String REMOTE_CONFIG_PORT_KEY
public static final java.lang.String SOCKET_PROTOCOL
public static final java.lang.String SSL_PROTOCOL
public static final java.lang.String HTTP_PROTOCOL
public static final java.lang.String HTTPS_PROTOCOL
public static void startJADE(Properties p, java.lang.Runnable r)
p
- A property bag, containing name-value pairs used
to configure the container during boot.r
- A Runnable
object, whose
run()
method will be executed just after
container termination.public static void stopJADE()
public static boolean isRunning()
true
is returned. Otherwise, the method
returns false
.public static java.lang.String getContainerName()
public static void startAgent(java.lang.String name, java.lang.String className, java.lang.String[] args) throws java.lang.Exception
name
- The local name (i.e. without the platform ID)
of the agent to create.className
- The fully qualified name of the class
implementing the agent to start.args
- The creation arguments for the agent.java.lang.Exception
- If the underlying agent creation process
fails.public static void startAgent(java.lang.String name, java.lang.String className, java.lang.Object[] args) throws java.lang.Exception
name
- The local name (i.e. without the platform ID)
of the agent to create.className
- The fully qualified name of the class
implementing the agent to start.args
- The creation arguments for the agent.java.lang.Exception
- If the underlying agent creation process
fails.public static void killAgent(java.lang.String name) throws NotFoundException
name
- The local name (i.e. without the platform ID)
of the agent to kill.NotFoundException
- If no agent with the given local
name are running within the active Front End.public static AgentController getAgent(java.lang.String localName) throws ControllerException
localAgentName
- The short local name of the desired agent.ControllerException
- If any problems occur obtaining this proxy.public static int size() throws ControllerException
ControllerException
public static void addListener(FEListener l)
l
- The listener that will be notified about Front-End relevant eventspublic static void removeListener(FEListener l)
l
- The listener to be removedpublic static void detach()