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)

Field Summary
static QName[] PROPERTIES
           
 
Method Summary
 java.util.Date getCurrentTime()
           
 java.util.Date getTerminationTime()
           
 java.util.Date setTerminationTime(java.util.Date time)
           
 
Methods inherited from interface org.apache.muse.ws.resource.WsResourceCapability
deleteProperty, getProperty, getPropertyNames, getWsResource, insertProperty, updateProperty
 
Methods inherited from interface org.apache.muse.core.Capability
getActions, getCapabilityURI, getEnvironment, getLog, getMessageHandler, getPersistence, getResource, initializeCompleted, prepareShutdown, setCapabilityURI, setEnvironment, setLog, setMessageHandlers, setPersistence, setResource
 
Methods inherited from interface org.apache.muse.core.Initialization
hasBeenInitialized, initialize
 
Methods inherited from interface org.apache.muse.core.InitializationParameters
getInitializationParameter, getInitializationParameters, setInitializationParameters
 
Methods inherited from interface org.apache.muse.core.Shutdown
hasBeenShutdown, shutdown
 

Field Detail

PROPERTIES

public static final QName[] PROPERTIES
Method Detail

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.