public abstract class BaseAgent extends ClusteredServer
IfsServer.ServerRequest
Modifier and Type | Field and Description |
---|---|
static String |
ERROR_COUNT_CUMULATIVE |
static String |
ERROR_COUNT_LAST_ACTIVATION |
LEVEL_HIGH, LEVEL_LOW, LEVEL_MEDIUM, LEVEL_OFF
SERVERSTATUS_DISPOSED, SERVERSTATUS_RUNNING, SERVERSTATUS_STARTING, SERVERSTATUS_STOPPED, SERVERSTATUS_STOPPING, SERVERSTATUS_SUSPENDED, SERVERSTATUS_UNKNOWN
Constructor and Description |
---|
BaseAgent()
Constructs the BaseAgent.
|
Modifier and Type | Method and Description |
---|---|
protected void |
activate()
Dummy action must be overridden by subclasses
|
protected void |
addToProperty(String name,
int number)
Add number to an existing int property.
|
IfsLogger |
getLogger()
Gets the appropriate logger for this server.
|
protected void |
handleResumeRequest()
handle the resume request.
|
protected void |
handleStopRequest()
handle the stop request.
|
protected void |
handleSuspendRequest()
handle the suspend request.
|
protected void |
handleTimerExpired()
handle the timer expired request.
|
protected void |
incrementProperty(String name)
Increment an int property and publish it
|
void |
initialize()
Initialize prior to running
|
protected void |
initOnRun()
Initialize at start of run method
|
boolean |
isAgent()
Gets whether this Server is an agent.
|
void |
postRun()
Performs post-run tasks.
|
protected void |
processWithinRun()
Process within the run loop.
|
protected void |
publishProperty(String name,
AttributeValue av)
Publish a property for the world to see
|
void |
run()
Runs the agent
|
protected void |
standardPostRun()
Convience method for subclasses of BaseAgent the performs post-run
standard tasks disconnectSession() and stopTimer()
|
boolean |
supportsSuspendResume()
Gets whether this Server supports suspend/resume.
|
cancelRegistration, checkRegistration, deriveAgentIdentifier, deriveRunningServerIdentifier, getAgentIdentifier, getAgentIdentifierPrefix, getRegistrationPeriod, getRunningNodeIdentifier, getRunningNodeName, getRunningServerIdentifier, initializeRegistration, isRegistered, isServerRunning, isTokenNonCompeting
checkSession, connectSession, constructSession, convertTimerInterval, convertTimerInterval, convertTimerInterval, dispose, getLastTimerActivation, getNextTimerActivation, getService, getTimerActivationPeriod, getTimerClassName, getTimerConfiguration, handlePriorityChangeRequest, handlePropertyChangeRequest, handlePropertyChangeRequest, handleRequest, handleRequests, handleServerStateControllerRequest, isNonCompeting, isPropertyReadonly, isServiceAvailable, isTimerActive, postCheckServerStateRequest, postRequest, preRun, processEvent, processEvents, queueEvent, resetTimer, restart, resume, serviceAvailabilityCheckNeeded, setPriority, setProperty, setProperty, start, startTimer, stop, stopRequested, stopTimer, suspend, timerExpired, waitForServiceAvailability, waitServer
acquireSession, constructLibrarySessionPool, createServerState, deregister, disconnectSession, getConfigurationOverridesTable, getConfigurationTable, getCredential, getDesiredStatus, getIfsHome, getInitialConfigurationTable, getLoggerForLegacyLogging, getName, getNode, getNodeName, getOracleHome, getParameterTable, getPriority, getProperties, getProperty, getServerConfigurationName, getServerState, getServerStateValue, getServerType, getServiceName, getSession, getStateTable, getStatus, getSystemUserCredential, handleServerConfigurationOverrideRequest, handleServerStateEvent, initialize, initialize, isDisposed, isInitialized, isLogged, log, log, log, releaseSession, releaseSession, setDesiredStatus, setDesiredStatus, setSessionTimeoutPrevented, setStateProperty, setStatus, startStandalone, startStandalone, supportsPriority, toStatusLabel, toStatusLabel, toStatusLabel, verifyNotDisposed, verifyNotDisposed
public static final String ERROR_COUNT_LAST_ACTIVATION
public static final String ERROR_COUNT_CUMULATIVE
public BaseAgent() throws IfsException
IfsException
public IfsLogger getLogger()
Typically overridden by subclasses to return the IfsLogger associatged with the specific server.
public boolean isAgent() throws IfsException
This method is called by iFS administration tools to group together servers that are agents in administration user interfaces.
isAgent
in interface ServerInterface
isAgent
in class Server
IfsException
- (IFS-45178) if the operation failspublic void initialize() throws Exception
initialize
in class IfsServer
Exception
- if the operation failsprotected void initOnRun() throws Exception
Exception
public void postRun()
protected void handleStopRequest() throws Exception
handleStopRequest
in class IfsServer
IfsException
- if operation failsException
- if the operation failsprotected void handleSuspendRequest() throws IfsException, Exception
handleSuspendRequest
in class IfsServer
IfsException
- if operation failsException
- if the operation failsprotected void handleResumeRequest() throws IfsException, Exception
handleResumeRequest
in class IfsServer
IfsException
- if operation failsException
- if the operation failsprotected void handleTimerExpired() throws IfsException, Exception
handleTimerExpired
in class IfsServer
IfsException
- if operation failsException
- if the operation failsprotected void activate() throws IfsException
IfsException
- if the operation failsprotected void processWithinRun() throws IfsException
IfsException
- if the operation failsprotected void standardPostRun()
protected void publishProperty(String name, AttributeValue av) throws IfsException
IfsException
protected void incrementProperty(String name) throws IfsException
IfsException
protected void addToProperty(String name, int number) throws IfsException
IfsException
public boolean supportsSuspendResume() throws IfsException
This override forces a return of true, indicating that suspend/resume is supported.
supportsSuspendResume
in interface ServerInterface
supportsSuspendResume
in class Server
handleSuspendRequest
,
and handleResumeRequest
IfsException
- if the operation failsCopyright © 2023. All rights reserved.