de.fzj.unicore.wsrflite
Interface WSRFInstance

All Known Subinterfaces:
AdminService, ISubscription, ServiceGroupEntry, WSResource, WSRFNotificationProducer
All Known Implementing Classes:
AdminServiceImpl, NotificationProducerImpl, ServiceGroupEntryImpl, ServiceGroupImpl, ServiceGroupRegistrationImpl, SubscriptionImpl, WSResourceImpl, WSRFInstanceImpl

public interface WSRFInstance

Lifecycle methods and helper methods for WS-Resources.
These are called by the hosting environment to initialise, destroy or persist WS-Resource instances.
To persist a WSRFInstance, the hosting environment calls passivate(), and stores the resulting Map.

Author:
schuller
See Also:
WSRFInstanceImpl

Method Summary
 void activate(Map<String,Serializable> context)
          Called when the instance is reloaded into memory from persistent storage
This nay occur quite often, so users of this class should try not to perform expensive operations in this method.
 void clearChangeFlag()
          clear the "dirty" flag, called by the container after the resource has been persisted
 void clearSecurityContext()
           
 void destroy()
          perform resource-specific clean up operations
Called when the resource is destroyed, specifically, this will be executed : when external clients use the ResourceLifetime interface to destroy a WS-Resource when the lifetime expires and the container destroys the resource
 Map<String,Object> getSecurityContext()
           
 String getServiceName()
          return the service name
 Calendar getTerminationTime()
          get the termination time (expiry date) for the instance.
 String getUniqueID()
          get the unique ID of this WSRF instance
 boolean hasChanged()
          Has the resource changed?
 void initialise(String serviceName, Map<String,Object> initobjs)
          called when the resource is first created and initialised by the hosting environment
 boolean isDestroyed()
          has the resource been destroyed?
 boolean isExpired()
          Is this resource expired and can be removed?
 Map<String,Serializable> passivate()
          called when the instance is persisted
 void postActivate()
          post-activation hook
this is called when the instance is reloaded into memory, after activate() has been called and the access control check has been passed
 void processMessages(PullPoint messageIterator)
          Called when messages are available for this WSRF instance which should be processed.
 void setHome(Home home)
          set the home
 void setSecurityContext(Map<String,Object> ctx)
           
 void setServiceName(String serviceName)
          set the service name
 void setUniqueID(String id)
          set the unique ID of this WSRF instance
 

Method Detail

getSecurityContext

Map<String,Object> getSecurityContext()

setSecurityContext

void setSecurityContext(Map<String,Object> ctx)

clearSecurityContext

void clearSecurityContext()

getUniqueID

String getUniqueID()
get the unique ID of this WSRF instance

Returns:
the unique id

setUniqueID

void setUniqueID(String id)
set the unique ID of this WSRF instance


initialise

void initialise(String serviceName,
                Map<String,Object> initobjs)
                throws Exception
called when the resource is first created and initialised by the hosting environment

Parameters:
serviceName - the service name this instance belongs to
initobjs - Service specific array with initialisation objects
Throws:
Exception

getServiceName

String getServiceName()
return the service name

Returns:

setServiceName

void setServiceName(String serviceName)
set the service name


setHome

void setHome(Home home)
set the home

Parameters:
home -

isExpired

boolean isExpired()
Is this resource expired and can be removed?

Returns:
boolean true if the resource is expired

getTerminationTime

Calendar getTerminationTime()
get the termination time (expiry date) for the instance.
if null, the instance never expires

Returns:
Calendar

hasChanged

boolean hasChanged()
Has the resource changed?

Returns:
boolean true if the resource has changed and should be persisted

isDestroyed

boolean isDestroyed()
has the resource been destroyed?

Returns:

clearChangeFlag

void clearChangeFlag()
clear the "dirty" flag, called by the container after the resource has been persisted


destroy

void destroy()
perform resource-specific clean up operations
Called when the resource is destroyed, specifically, this will be executed :


passivate

Map<String,Serializable> passivate()
called when the instance is persisted

Returns:
context a map containing the state of the WS-Resource

activate

void activate(Map<String,Serializable> context)
Called when the instance is reloaded into memory from persistent storage
This nay occur quite often, so users of this class should try not to perform expensive operations in this method.

Parameters:
context - a map containing the state of the WS-Resource

postActivate

void postActivate()
post-activation hook
this is called when the instance is reloaded into memory, after activate() has been called and the access control check has been passed


processMessages

void processMessages(PullPoint messageIterator)
Called when messages are available for this WSRF instance which should be processed.
This method will be called by the container typically at the beginning of a web service call, after the WSRF instance is properly activated and before the actual ws method is invoked.

Since:
1.8.9


Copyright © 2010. All Rights Reserved.