org.apache.muse.ws.resource.lifetime
Interface ScheduledTermination
- All Superinterfaces:
- Capability, Initialization, InitializationParameters, Shutdown, WsResourceCapability, org.apache.muse.ws.resource.WsResourceCapabilityProperties
- All Known Implementing Classes:
- SimpleScheduledTermination
- public interface ScheduledTermination
- extends WsResourceCapability
ScheduledTermination represents the WS-ResourceLifetime ScheduledResourceTermination
capability, which has two properties (wsrf-rl:CurrentTime and
wsrf-rl:TerminationTime) and one method (wsrf-rl:SetTerminationTime).
Implementations of this capability provide the self-destruction feature
that occurs when the system's current time reaches the resource's
termination time.
- Author:
- Dan Jemiolo (danj)
Methods inherited from interface org.apache.muse.core.Capability |
getActions, getCapabilityURI, getEnvironment, getLog, getMessageHandler, getPersistence, getResource, initializeCompleted, prepareShutdown, setCapabilityURI, setEnvironment, setLog, setMessageHandlers, setPersistence, setResource |
PROPERTIES
public static final QName[] PROPERTIES
getCurrentTime
public java.util.Date getCurrentTime()
throws BaseFault
- Returns:
- The current time, according to the system the resource is on.
- Throws:
BaseFault
getTerminationTime
public java.util.Date getTerminationTime()
throws BaseFault
- Returns:
- The termination time for this resource, or null if the resource
is not scheduled for termination.
- Throws:
BaseFault
setTerminationTime
public java.util.Date setTerminationTime(java.util.Date time)
throws UnableToSetTerminationTimeFault,
TerminationTimeChangeRejectedFault
- Parameters:
time
- The new termination time. If the time is null, the resource
will not be scheduled for destruction. If the time is in the
past, it will be destroyed immediately.
- Returns:
- The previous termination time value (or null, if none existed).
- Throws:
UnableToSetTerminationTimeFault
-
- If the new time is invalid or the current time cannot
be adjusted.
TerminationTimeChangeRejectedFault
-
- If the new time is invalid according to a policy of
the WS-RL implementation.