Apache Muse - WS-ResourceLifetime - ScheduledResourceTermination Capability
Spec name and port type: WS-ResourceLifetime v1.2, ScheduledResourceTermination (WSDL)
Capability URI: http://docs.oasis-open.org/wsrf/rlw-2/ScheduledTermination
Description: This capability defines two properties - wsrf-rl:CurrentTime and wsrf-rl:TerminationTime - and one operation - SetTerminationTime. The wsrf-rl:CurrentTime property is the current time according to the resource, and is used to determine how far off the wsrf-rl:TerminationTime is. Per the spec, the wsrf-rl:TerminationTime property must be set using the SetTerminationTime operation, not the WSRP SetResourceProperties operation. When the wsrf-rl:TerminationTime arrives, the resource will initiate its own destruction.
Java interface: org.apache.muse.ws.resource.lifetime.ScheduledTermination
JAR file: muse-wsrf-api.jar
Default Java implementation: org.apache.muse.ws.resource.lifetime.impl.SimpleScheduledTermination
JAR file: muse-wsrf-impl.jar
Action on initialize(): This implementation creates a java.util.Timer that can be scheduled (and rescheduled) according to the current wsrf-rl:TerminationTime. It is not scheduled until a valid wsrf-rl:TerminationTime is set using the SetTerminationTime operation.
Action on initializeCompleted(): None.
Action on prepareShutdown(): None.
Action on shutdown(): The termination timer is cancelled. If the timer has already fired, this is a no-op.
Non-Core Dependencies: None.
Behavior and Limitations: The termination timer is scheduled the first
time the wsrf-rl:TerminationTime is set to a non-null value. It is rescheduled (cancelled
and then scheduled again) for each subsequent non-null value. It is cancelled
when the wsrf-rl:TerminationTime is set to null. Cancelling an already cancelled timer
is a no-op.
When the termination timer fires, it invokes the resource's shutdown() method.
Initialization parameters: None.