|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.fzj.unicore.wsrflite.impl.WSRFInstanceImpl
public abstract class WSRFInstanceImpl
Base implementation of the WSRFInstance lifecycle interface
Persistence is handled using annotations: persistent fields are
marked with the Persist annotation.
| Field Summary | |
|---|---|
protected Home |
home
|
static String |
INIT_INITIAL_TERMINATION_TIME
an initialisation parameter that may be used to set the initial termination time on a resource, expected to be a java.util.Calendar |
static String |
INIT_UNIQUE_ID
an initialisation parameter that may be used to set the unique id on a resource, expected to be a String |
protected boolean |
isDirty
|
| Constructor Summary | |
|---|---|
WSRFInstanceImpl()
default constructor further initialisation is done through initialise() or activate() |
|
| Method Summary | |
|---|---|
void |
activate(Map<String,Serializable> state)
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 cleanup. |
protected int |
getDefaultLifetime()
return the default lifetime of a ws-resource in seconds |
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()
return true if the wsresource has 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()
check expiry. |
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 |
setDirty()
set the "dirty" flag, so the state of this instance will be written to permanent storage |
void |
setHome(Home home)
set the home |
void |
setSecurityContext(Map<String,Object> ctx)
|
void |
setServiceName(String serviceName)
set the service name |
void |
setTerminationTime(Calendar newTT)
|
void |
setUniqueID(String uniqueID)
set the unique ID of this WSRF instance |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected transient Home home
protected boolean isDirty
public static final String INIT_UNIQUE_ID
public static final String INIT_INITIAL_TERMINATION_TIME
| Constructor Detail |
|---|
public WSRFInstanceImpl()
| Method Detail |
|---|
public void setDirty()
public void clearChangeFlag()
WSRFInstance
clearChangeFlag in interface WSRFInstancepublic void postActivate()
WSRFInstance
postActivate in interface WSRFInstancepublic Map<String,Object> getSecurityContext()
getSecurityContext in interface WSRFInstancepublic void setSecurityContext(Map<String,Object> ctx)
setSecurityContext in interface WSRFInstancepublic void clearSecurityContext()
clearSecurityContext in interface WSRFInstancepublic String getUniqueID()
WSRFInstance
getUniqueID in interface WSRFInstancepublic String getServiceName()
WSRFInstance
getServiceName in interface WSRFInstancepublic void setServiceName(String serviceName)
WSRFInstance
setServiceName in interface WSRFInstancepublic boolean isExpired()
isExpired in interface WSRFInstancepublic Calendar getTerminationTime()
WSRFInstance
getTerminationTime in interface WSRFInstance
public void setTerminationTime(Calendar newTT)
throws UnableToSetTerminationTimeException
UnableToSetTerminationTimeExceptionpublic boolean hasChanged()
hasChanged in interface WSRFInstancepublic void destroy()
destroy in interface WSRFInstancepublic final boolean isDestroyed()
WSRFInstance
isDestroyed in interface WSRFInstancepublic void setHome(Home home)
WSRFInstance
setHome in interface WSRFInstance
public void initialise(String serviceName,
Map<String,Object> initobjs)
throws Exception
WSRFInstance
initialise in interface WSRFInstanceserviceName - the service name this instance belongs toinitobjs - Service specific array with initialisation objects
Exceptionprotected int getDefaultLifetime()
DefaultHome.DEFAULT_LIFETIMEpublic Map<String,Serializable> passivate()
WSRFInstance
passivate in interface WSRFInstancepublic void activate(Map<String,Serializable> state)
WSRFInstance
activate in interface WSRFInstancestate - a map containing the state of the WS-Resourcepublic void setUniqueID(String uniqueID)
WSRFInstance
setUniqueID in interface WSRFInstanceuniqueID - The uniqueID to set.public void processMessages(PullPoint messageIterator)
WSRFInstance
processMessages in interface WSRFInstance
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||