org.gcube.data.tm.state
Class AccessorResource

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.common.core.state.GCUBEWSLiteResource<SourceResource>
                  extended by org.gcube.data.tm.state.AccessorResource
All Implemented Interfaces:
org.gcube.common.core.utils.handlers.GCUBEServiceClient, org.gcube.data.tmf.api.SourceConsumer, org.globus.wsrf.PersistenceCallback, org.globus.wsrf.Resource, org.globus.wsrf.ResourceLifetime, org.globus.wsrf.ResourceProperties, org.globus.wsrf.TopicListAccessor
Direct Known Subclasses:
TReaderResource, TWriterResource

public abstract class AccessorResource
extends org.gcube.common.core.state.GCUBEWSLiteResource<SourceResource>
implements org.gcube.data.tmf.api.SourceConsumer

Base class for stateful resources of T-Reader and T-Writer services.

Author:
Fabio Simeoni

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
protected static int PART_SIZE
           
 
Fields inherited from class org.gcube.common.core.state.GCUBEStatefulResource
logger, uuidGen
 
Constructor Summary
AccessorResource()
           
 
Method Summary
 Long getCardinality()
          Returns the cardinality of the source.
 Calendar getLastUpdate()
          Returns the time in which the collection was last updated.
 String getName()
          Returns the source identifier.
 String getPlugin()
          Returns the name of the associated plugin.
 org.gcube.common.core.types.DescriptiveProperty[] getProperty()
          Returns the descriptive properties of the resource.
protected  String[] getPropertyNames()
          
 String getSourceId()
          Returns the source identifier.
 QName[] getType()
          Returns the data type of the resource.
protected  void initialise(Object... params)
          
protected  void initialiseContainers()
          
 void onEvent(org.gcube.data.tmf.api.SourceEvent... events)
          
protected  void subscribeForChange()
           
 
Methods inherited from class org.gcube.common.core.state.GCUBEWSLiteResource
getLocalID, getLocalResource, getProperty, initialise, onRemove, setLocalID, transformParams
 
Methods inherited from class org.gcube.common.core.state.GCUBEWSResource
getCurrentTime, getEPR, getPorttypeContext, getPublisher, getResourcePropertySet, getServiceContext, getTerminationTime, getTopicList, getTopicNames, inScope, load, publish, setPortTypeContext, setTerminationTime, unpublish
 
Methods inherited from class org.gcube.common.core.state.GCUBEStatefulResource
getID, getLock, getScheduledTasks, getScope, launchTask, 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
 

Field Detail

PART_SIZE

protected static final int PART_SIZE
See Also:
Constant Field Values
Constructor Detail

AccessorResource

public AccessorResource()
Method Detail

initialise

protected void initialise(Object... params)
                   throws Exception

Specified by:
initialise in class org.gcube.common.core.state.GCUBEWSResource
Throws:
Exception

getPropertyNames

protected String[] getPropertyNames()

Specified by:
getPropertyNames in class org.gcube.common.core.state.GCUBEWSLiteResource<SourceResource>

initialiseContainers

protected void initialiseContainers()
                             throws Exception

Overrides:
initialiseContainers in class org.gcube.common.core.state.GCUBEWSResource
Throws:
Exception

getPlugin

public String getPlugin()
                 throws org.globus.wsrf.ResourceException
Returns the name of the associated plugin.

Returns:
the name
Throws:
org.globus.wsrf.ResourceException

getSourceId

public String getSourceId()
                   throws org.globus.wsrf.ResourceException
Returns the source identifier.

Returns:
the identifier
Throws:
org.globus.wsrf.ResourceException

getName

public String getName()
               throws org.globus.wsrf.ResourceException
Returns the source identifier.

Returns:
the identifier
Throws:
org.globus.wsrf.ResourceException

getCardinality

public Long getCardinality()
                    throws org.globus.wsrf.ResourceException
Returns the cardinality of the source.

Returns:
the cardinality
Throws:
org.globus.wsrf.ResourceException

getLastUpdate

public Calendar getLastUpdate()
                       throws org.globus.wsrf.ResourceException
Returns the time in which the collection was last updated.

Returns:
the time.
Throws:
org.globus.wsrf.ResourceException

getType

public QName[] getType()
                throws org.globus.wsrf.ResourceException
Returns the data type of the resource.

Returns:
the type.
Throws:
org.globus.wsrf.ResourceException

getProperty

public org.gcube.common.core.types.DescriptiveProperty[] getProperty()
                                                              throws org.globus.wsrf.ResourceException
Returns the descriptive properties of the resource.

Returns:
the properties.
Throws:
org.globus.wsrf.ResourceException

subscribeForChange

protected void subscribeForChange()
                           throws org.globus.wsrf.ResourceException
Throws:
org.globus.wsrf.ResourceException

onEvent

public void onEvent(org.gcube.data.tmf.api.SourceEvent... events)

Specified by:
onEvent in interface org.gcube.data.tmf.api.SourceConsumer


Copyright © 2012. All Rights Reserved.