org.gcube.vremanagement.resourcemanager.impl.state
Class InstanceState

java.lang.Object
  extended by org.gcube.common.core.utils.handlers.GCUBEServiceClientImpl
      extended by org.gcube.common.core.state.GCUBEStatefulResource<org.gcube.common.core.state.GCUBEWSResourceKey>
          extended by org.gcube.common.core.state.GCUBEWSResource
              extended by org.gcube.vremanagement.resourcemanager.impl.state.InstanceState
All Implemented Interfaces:
org.gcube.common.core.utils.handlers.GCUBEServiceClient, org.globus.wsrf.PersistenceCallback, org.globus.wsrf.Resource, org.globus.wsrf.ResourceLifetime, org.globus.wsrf.ResourceProperties, org.globus.wsrf.TopicListAccessor

public final class InstanceState
extends org.gcube.common.core.state.GCUBEWSResource

The ResourceManager's stateful resource

Author:
Manuele Simi (ISTI-CNR)

Nested Class Summary
 
Nested classes/interfaces inherited from class org.gcube.common.core.state.GCUBEStatefulResource
org.gcube.common.core.state.GCUBEStatefulResource.LOCK, org.gcube.common.core.state.GCUBEStatefulResource.TaskContext
 
Field Summary
 
Fields inherited from class org.gcube.common.core.state.GCUBEStatefulResource
logger, uuidGen
 
Constructor Summary
InstanceState()
           
 
Method Summary
 void addSession(org.gcube.common.core.scope.GCUBEScope scope, Session session)
          Adds a new Session to the service's state
 void createState(org.gcube.common.core.scope.GCUBEScope scope)
          Creates a new state for the given scope
 void disposeState(org.gcube.common.core.scope.GCUBEScope scope, Session report)
          Disposes the scope
 PublishedScopeResource getPublishedScopeResource(org.gcube.common.core.scope.GCUBEScope scope)
          Gets the resource published in the IS for the given scope
 String getSerializedSession(String id)
          Gets the string representation of a Session
 Session getSession(String id)
          Gets the Session
 ScopeState getState(org.gcube.common.core.scope.GCUBEScope scope)
          Gets the state for the given scope
protected  void initialise(Object... params)
           
protected  void reuseState(org.gcube.common.core.scope.GCUBEScope scope)
           
 
Methods inherited from class org.gcube.common.core.state.GCUBEWSResource
getCurrentTime, getEPR, getPorttypeContext, getProperty, getPropertyNames, getPublisher, getResourcePropertySet, getServiceContext, getTerminationTime, getTopicList, getTopicNames, initialise, initialiseContainers, inScope, load, publish, setPortTypeContext, setTerminationTime, unpublish
 
Methods inherited from class org.gcube.common.core.state.GCUBEStatefulResource
getID, getLock, getScheduledTasks, getScope, launchTask, onRemove, setID, setPersistenceDelegate, stopTask, store
 
Methods inherited from class org.gcube.common.core.utils.handlers.GCUBEServiceClientImpl
getPortTypeMap, setPortTypeMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.globus.wsrf.PersistenceCallback
store
 

Constructor Detail

InstanceState

public InstanceState()
Method Detail

initialise

protected void initialise(Object... params)
                   throws Exception
Specified by:
initialise in class org.gcube.common.core.state.GCUBEWSResource
Throws:
Exception

reuseState

protected void reuseState(org.gcube.common.core.scope.GCUBEScope scope)
                   throws Exception
Throws:
Exception

getSession

public Session getSession(String id)
                   throws IOException
Gets the Session

Parameters:
id - the session ID
Returns:
the session
Throws:
IOException

getSerializedSession

public String getSerializedSession(String id)
                            throws IOException
Gets the string representation of a Session

Parameters:
id - the session ID
Returns:
the string representation of the session
Throws:
IOException

addSession

public void addSession(org.gcube.common.core.scope.GCUBEScope scope,
                       Session session)
                throws org.globus.wsrf.NoSuchResourceException
Adds a new Session to the service's state

Parameters:
session - the session to add
Throws:
org.globus.wsrf.NoSuchResourceException

getState

public ScopeState getState(org.gcube.common.core.scope.GCUBEScope scope)
                    throws org.globus.wsrf.NoSuchResourceException
Gets the state for the given scope

Returns:
the list of scoped resources
Throws:
org.globus.wsrf.NoSuchResourceException

disposeState

public void disposeState(org.gcube.common.core.scope.GCUBEScope scope,
                         Session report)
                  throws IOException,
                         VirtualNode.NoGHNFoundException
Disposes the scope

Parameters:
report -
Throws:
IOException
VirtualNode.NoGHNFoundException

getPublishedScopeResource

public PublishedScopeResource getPublishedScopeResource(org.gcube.common.core.scope.GCUBEScope scope)
                                                 throws org.globus.wsrf.NoSuchResourceException
Gets the resource published in the IS for the given scope

Parameters:
scope -
Returns:
the resource
Throws:
org.globus.wsrf.NoSuchResourceException

createState

public void createState(org.gcube.common.core.scope.GCUBEScope scope)
                 throws org.globus.wsrf.NoSuchResourceException,
                        Exception
Creates a new state for the given scope

Parameters:
scope -
Throws:
org.globus.wsrf.NoSuchResourceException
Exception


Copyright © 2012. All Rights Reserved.