|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An Agent is an interface that defines a specific task that is managed by ServerManager.
Most implementations of agents will use the base implementation, oracle.ifs.agents.common.IfsAgent, but any other implementations of this interface will be supported by ServerManager.
Method Summary | |
AgentLogger |
getAgentLogger()
Gets the logger used by the Agent. |
java.lang.String |
getName()
Gets the name of this Agent. |
ParameterTable |
getParameterTable()
Gets the AgentManager ParameterTable. |
int |
getPriority()
Gets the priority of this Agent. |
boolean |
isAlive()
Gets whether this Agent is alive. |
boolean |
isSuspended()
Gets whether this Agent is suspended. |
void |
postRun()
Performs post-run tasks for this Agent. |
void |
register()
Registers this agent with iFS. |
void |
restart()
Restarts this Agent. |
void |
resume()
Resumes this Agent. |
void |
run()
Runs this Agent. |
void |
setAgentLogger(AgentLogger logger)
Sets the logger to be used by the Agent. |
void |
setPriority(int priority)
Sets the priority of this Agent. |
void |
start()
Starts this Agent. |
void |
stop()
Stops this Agent. |
void |
suspend()
Suspends this Agent. |
void |
terminate()
Terminates this Agent. |
Method Detail |
public java.lang.String getName()
public ParameterTable getParameterTable()
public AgentLogger getAgentLogger()
public void setAgentLogger(AgentLogger logger) throws IfsException
logger
- the AgentLogger to be used for logging.IfsException
- if the operation failspublic void register() throws IfsException
IfsException
- (IFS-46013) if the operation failspublic int getPriority() throws IfsException
The priority must be between Thread.MIN_PRIORITY
and
Thread.MAX_PRIORITY
, inclusive.
IfsException
- (IFS-46013) if the operation failspublic void setPriority(int priority) throws IfsException
The priority must be between Thread.MIN_PRIORITY
and
Thread.MAX_PRIORITY
, inclusive.
priority
- the priorityIfsException
- (IFS-46014) if the operation failspublic void start() throws IfsException
Attempting to start an already-started Agent has no effect.
IfsException
- (IFS-46020) if the operation failspublic void restart() throws IfsException
Attempting to restart an Agent that is stopped is treated as a start request.
IfsException
- (IFS-46020) if the operation failspublic void stop() throws IfsException
Attempting to stop an unstarted or an already-stopped Agent has no effect.
IfsException
- (IFS-46021) if the operation failspublic void terminate() throws IfsException
IfsException
- (IFS-46021) if the operation failspublic void suspend() throws IfsException
Attempting to suspend an unstarted, stopped, or already-suspended Agent has no effect.
IfsException
- (IFS-46022) if the operation failspublic void resume() throws IfsException
Attempting to resume an unstarted, stopped, or unsuspended Agent has no effect.
IfsException
- (IFS-46023) if the operation failspublic boolean isAlive() throws IfsException
An Agent is alive if it has been started and has not stopped or been requested to stop.
IfsException
- (IFS-46030) if the operation failspublic boolean isSuspended() throws IfsException
An Agent is suspended if it has been started and then suspended, and has not resumed or stopped.
IfsException
- (IFS-46031) if the operation failspublic void run() throws IfsException
Override this method with the tasks to be performed by this Agent.
If this method returns (either explicitly or by throwing an Error),
postRun
is invoked and the Agent is stopped.
public void postRun() throws IfsException
Override this method with the tasks to be performed when this Agent
is stopped. An Agent stops when stop
is invoked, or
when run
either returns or throws an Error. When this
occurs, required clean-up tasks, such as disconnecting a LibrarySession,
can be performed in this method.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |