org.apache.muse.ws.resource.lifetime
Interface ScheduledTermination

All Superinterfaces:
Capability, Initialization, InitializationParameters, Shutdown, WsResourceCapability
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
 void deleteProperty(QName property)
           
 Date getCurrentTime()
           
 Element[] getProperty(QName property)
           
 QName[] getPropertyNames()
          Concrete capability classes that define properties MUST override this method and provide the names of the properties.
 Date getTerminationTime()
           
 void insertProperty(QName property, Element[] values)
           
 Date setTerminationTime(Date time)
           
 void updateProperty(QName property, Element[] values)
           
 
Methods inherited from interface org.apache.muse.ws.resource.WsResourceCapability
getWsResource
 
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

static final QName[] PROPERTIES
Method Detail

getCurrentTime

Date getCurrentTime()
                    throws BaseFault
Returns:
The current time, according to the system the resource is on.
Throws:
BaseFault

getTerminationTime

Date getTerminationTime()
                        throws BaseFault
Returns:
The termination time for this resource, or null if the resource is not scheduled for termination.
Throws:
BaseFault

setTerminationTime

Date setTerminationTime(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.

deleteProperty

void deleteProperty(QName property)
                    throws BaseFault
Throws:
BaseFault

getProperty

Element[] getProperty(QName property)
                      throws BaseFault
Throws:
BaseFault

getPropertyNames

QName[] getPropertyNames()
Concrete capability classes that define properties MUST override this method and provide the names of the properties.

Returns:
The names of the resource properties defined by this capability.

insertProperty

void insertProperty(QName property,
                    Element[] values)
                    throws BaseFault
Throws:
BaseFault

updateProperty

void updateProperty(QName property,
                    Element[] values)
                    throws BaseFault
Throws:
BaseFault


Copyright © 2005-2011 Apache Web Services - Muse. All Rights Reserved.