|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.fhg.igd.semoa.service.AbstractService
de.fhg.igd.semoa.server.AgentLauncherImpl
Implements a "convenience" service for creating
simple agents. Calling threads need to have permission to
access various very sensitive services in the server such
as the KeyMaster
.
Generated agents are launched automatically, if possible.
Nested Class Summary | |
protected class |
AgentLauncherImpl.AgentLauncherJob
Runnable class to invoke method launchAgent
in a new Thread. |
Field Summary | |
private SortedMap |
filters_
The SortedMap of launch filters an agent has
to pass. |
private long |
filterUpdate_
The last time the list of launch filters was fetched. |
private Object |
lock_
A private lock object. |
private static Logger |
log_
The Logger instance for this class |
Fields inherited from class de.fhg.igd.semoa.service.AbstractService |
REV_POSTFIX, REV_PREFIX |
Fields inherited from interface de.fhg.igd.semoa.server.AgentLauncher |
MODE_DIGEST, MODE_IMPORT, MODE_LOCAL, WHATIS |
Constructor Summary | |
AgentLauncherImpl()
|
Method Summary | |
String |
author()
Returns the name of the author of the service. |
protected SortedMap |
getLaunchFilters()
|
String |
info()
Returns the informative string which should describe the service's essence in a sentence. |
void |
launchAgent(Resource resource,
Properties props)
This method internally calls launchAgent(resource, props, false) . |
void |
launchAgent(Resource resource,
Properties props,
boolean wait)
Creates an agent and runs it in the local server. |
protected void |
launchAgent0(Resource resource,
Properties props)
|
String |
revision()
Returns the revision number of this class as a string. |
Methods inherited from class de.fhg.igd.semoa.service.AbstractService |
checkDependencies, dependencies, docs, doPrivileged, doPrivileged, getACC, getEnvironment, majorVersion, minorVersion, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static Logger log_
Logger
instance for this class
private long filterUpdate_
private SortedMap filters_
SortedMap
of launch filters an agent has
to pass.
private Object lock_
Constructor Detail |
public AgentLauncherImpl()
Method Detail |
public String info()
AbstractService
info
in interface Service
info
in class AbstractService
public String author()
AbstractService
author
in interface Service
author
in class AbstractService
public String revision()
AbstractService
majorVersion()
, minorVersion
based on the assumption that this method returns a
revision string as generated by rcs(1) for the template
"$Revision: 1.7 $/$Date: 2007-08-08 04:41:53 +0200 (Wed, 08 Aug 2007) $".
revision
in class AbstractService
protected SortedMap getLaunchFilters()
SortedMap
of agent launch filters.public void launchAgent(Resource resource, Properties props)
AgentLauncher
launchAgent(resource, props, false)
.
launchAgent
in interface AgentLauncher
public void launchAgent(Resource resource, Properties props, boolean wait)
AgentLauncher
Agent creation is created by means of properties. Please
refer to class AgentStructure
for a complete
list of properties required and interpreted by the default
mechanisms in SeMoA.
The Resource
passed to this method is
copied before any operations starts. In other words, the
resource that is passed is not modified, and modifying it
after the agent is launched will not cause side effects.
launchAgent
in interface AgentLauncher
props
- The properties of the agent, including the
properties that define how the agent is created.resource
- The resource that contains the data of
the agent. If it is null
then an empty
default resource is created for the agent.wait
- If true, the agent is launched in
a synchronous manner, otherwise the agent is launched in
a new thread and this method returns directly.
protected void launchAgent0(Resource resource, Properties props) throws GeneralSecurityException, IllegalAgentException, IOException
GeneralSecurityException
IllegalAgentException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |