public class LifecycleAgent extends ClusteredServer implements IfsEventHandler
LifecycleActionProcessor
,
LifecyclePolicyAction
Modifier and Type | Class and Description |
---|---|
class |
LifecycleAgent.ProcessingChannel
Holds inforamtion about a channel used to perform lifecycle processing
actions encapsulated by RegisteredPolicyEntry instances.
|
class |
LifecycleAgent.ProcessingExecutor
An Executor that handles the execution of ProcessingActionTasks.
|
class |
LifecycleAgent.RegisteredPolicyEntry
RegisteredPolicyEntry holds information about a registered
LifecyclePolicyEntry and manages the notifications to
the associated action.
|
class |
LifecycleAgent.SelectingChannel
Holds information about a channel used to perform lifecycle selection
for a specified RegisteredPolicyEntry instance.
|
class |
LifecycleAgent.SelectingExecutor
An Executor that handles the execution of SelectingActionTasks.
|
IfsServer.ServerRequest
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 |
---|
LifecycleAgent()
Constructs a LifecycleAgent.
|
Modifier and Type | Method and Description |
---|---|
void |
disableEventListening()
Disable listening for events on LifecyclePolicyEntry instances.
|
void |
enableEventListening()
Enable listening events on any LifecyclePolicyEntry.
|
IfsLogger |
getLogger()
Gets the appropriate logger for this server.
|
void |
handleEvent(IfsEvent event)
Handles events.
|
protected void |
handlePropertyChangeRequest(AttributeValue av)
Handles updates to dynamic properties.
|
protected void |
handleRequest(IfsServer.ServerRequest request)
Handles the specified pending request.
|
protected void |
handleResumeRequest()
Called when this Server is requested to resume.
|
protected void |
handleStopRequest()
Called when this Server is requested to stop.
|
protected void |
handleSuspendRequest()
Called when this Server is requested to suspend.
|
void |
initialize()
Perform one time initialization tasks upon loading.
|
boolean |
isAgent()
Gets whether this Server is an agent.
|
boolean |
isPropertyReadonly(String name)
Returns true if the property name specified is readonly.
|
static void |
main(String[] args)
Runs a LifecycleAgent in standalone mode.
|
void |
postRun()
Performs post-run tasks for this agent.
|
void |
processEvent(IfsEvent event)
Process the next event.
|
void |
run()
Runs this agent.
|
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, handleRequests, handleServerStateControllerRequest, handleTimerExpired, isNonCompeting, isServiceAvailable, isTimerActive, postCheckServerStateRequest, postRequest, preRun, 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 LifecycleAgent() throws IfsException
IfsException
- if the operation failspublic static void main(String[] args) throws Exception
args
- command line argsException
- if the operation failspublic IfsLogger getLogger()
Typically overridden by subclasses to return the IfsLogger associatged with the specific server.
public void initialize() throws Exception
initialize
in class IfsServer
Exception
- if the operation failspublic boolean isPropertyReadonly(String name) throws IfsException
isPropertyReadonly
in interface ServerInterface
isPropertyReadonly
in class IfsServer
name
- name of the propertyIfsException
- if the operation failsprotected void handlePropertyChangeRequest(AttributeValue av) throws Exception
handlePropertyChangeRequest
in class IfsServer
av
- the property that was changedException
- if the operation failspublic boolean isAgent() throws IfsException
Server
Returns false by default.
isAgent
in interface ServerInterface
isAgent
in class Server
IfsException
- (IFS-45178) if the operation failspublic void postRun()
protected void handleStopRequest() throws Exception
IfsServer
This method is called by handleRequests
. Override it
to perform tasks upon a request to stop. If not overridden, this
method simply causes subsequent calls to stopRequested
to return true
.
The handleRequests
method will rethrow any exception
thrown by this method.
handleStopRequest
in class IfsServer
Exception
- if the operation failspublic boolean supportsSuspendResume()
Server
If false, then suspend
and resume
will result in stop and start instead.
supportsSuspendResume
in interface ServerInterface
supportsSuspendResume
in class Server
protected void handleSuspendRequest() throws Exception
IfsServer
This method is called by handleRequests
. Override
it to perform tasks upon a suspend request. Unless overridden,
no operation is performed by this method.
If this method returns without throwing, the Server's status is
set to SERVERSTATUS_SUSPENDED
.
The handleRequests
method will rethrow any exception
thrown by this method.
handleSuspendRequest
in class IfsServer
Exception
- if the operation failsprotected void handleResumeRequest() throws Exception
IfsServer
This method is called by handleRequests
. Override
it to perform tasks upon a resume request. Unless overridden,
no operation is performed by this method.
If this method returns without throwing, the Server's status is
set to SERVERSTATUS_RUNNING
.
The handleRequests
method will rethrow any exception
thrown by this method.
handleResumeRequest
in class IfsServer
Exception
- if the operation failspublic void enableEventListening() throws IfsException
IfsException
- if the operation failspublic void disableEventListening() throws IfsException
IfsException
- if the operation failspublic void handleEvent(IfsEvent event) throws IfsException
This queues requests for processing by the main agent thread. Unlike
most agents, it does not queue event to be handled by
processEvents
.
handleEvent
in interface IfsEventHandler
event
- the eventIfsException
- if the operation failspublic void processEvent(IfsEvent event) throws IfsException
processEvent
in class IfsServer
event
- The next event to process.IfsException
- if the operation failsprotected void handleRequest(IfsServer.ServerRequest request) throws IfsException
Overridden to handle the custom requests for this agent. Defers to super for the standard request types.
handleRequest
in class IfsServer
request
- the request to handleIfsException
- if the operation failsCopyright © 2023. All rights reserved.