org.gcube.data.tm.state
Class SourceResource

java.lang.Object
  extended by org.gcube.common.core.utils.handlers.GCUBEServiceClientImpl
      extended by org.gcube.common.core.state.GCUBEStatefulResource<String>
          extended by org.gcube.common.core.state.GCUBELocalResource
              extended by org.gcube.data.tm.state.SourceResource
All Implemented Interfaces:
org.gcube.common.core.utils.handlers.GCUBEServiceClient, org.gcube.data.tmf.api.SourceConsumer, org.globus.wsrf.Resource

public class SourceResource
extends org.gcube.common.core.state.GCUBELocalResource
implements org.gcube.data.tmf.api.SourceConsumer

A GCUBELocalResource that models data sources.

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
 
Fields inherited from class org.gcube.common.core.state.GCUBELocalResource
context
 
Fields inherited from class org.gcube.common.core.state.GCUBEStatefulResource
logger, uuidGen
 
Constructor Summary
SourceResource()
           
 
Method Summary
 String getPluginName()
          Returns the name of the associated plugin.
protected  void initialise(String id, Object... params)
          
 void onEvent(org.gcube.data.tmf.api.SourceEvent... event)
           
protected  void onRemove()
          
 void setPluginName(String n)
          Sets the name of the associated plugin.
 void setSource(org.gcube.data.tmf.api.Source source)
          Sets the source.
 org.gcube.data.tmf.api.Source source()
          Returns the source.
 
Methods inherited from class org.gcube.common.core.state.GCUBELocalResource
addLink, getLinks, getServiceContext, removeLink, setLinks, setServiceContext
 
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
 

Constructor Detail

SourceResource

public SourceResource()
Method Detail

initialise

protected void initialise(String id,
                          Object... params)
                   throws Exception

Overrides:
initialise in class org.gcube.common.core.state.GCUBELocalResource
Throws:
Exception

source

public org.gcube.data.tmf.api.Source source()
Returns the source.

Returns:
the source

setSource

public void setSource(org.gcube.data.tmf.api.Source source)
Sets the source.

Parameters:
source - the source

setPluginName

public void setPluginName(String n)
Sets the name of the associated plugin.

Parameters:
n - the name.

getPluginName

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

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

onEvent

public void onEvent(org.gcube.data.tmf.api.SourceEvent... event)
Specified by:
onEvent in interface org.gcube.data.tmf.api.SourceConsumer

onRemove

protected void onRemove()
                 throws org.globus.wsrf.ResourceException

Overrides:
onRemove in class org.gcube.common.core.state.GCUBEStatefulResource<String>
Throws:
org.globus.wsrf.ResourceException


Copyright © 2012. All Rights Reserved.