org.gcube.common.core.utils.handlers
Class GCUBEStatefulServiceHandler<CLIENT extends GCUBEServiceClient>

java.lang.Object
  extended by org.gcube.common.core.utils.handlers.GCUBEHandler<CLIENT>
      extended by org.gcube.common.core.utils.handlers.GCUBEServiceHandler<CLIENT>
          extended by org.gcube.common.core.utils.handlers.GCUBEStatefulServiceHandler<CLIENT>
Type Parameters:
CLIENT - the type of the handled object. It must implement the GCUBEServiceClient interface.
All Implemented Interfaces:
GCUBEIHandler<CLIENT>, Lifetime<CLIENT>
Direct Known Subclasses:
GCUBEStagingServiceHandler, WSCall.WSCallHandler

public abstract class GCUBEStatefulServiceHandler<CLIENT extends GCUBEServiceClient>
extends GCUBEServiceHandler<CLIENT>

Abstract specialisation of GCUBEServiceHandler to stateful service port-types which follow WSRF's implied resource access pattern.

Subclasses must implement the abstract method findWSResources(), to interact with WS-Resources produced by instances of the stateful port-type :


Nested Class Summary
 
Nested classes/interfaces inherited from class org.gcube.common.core.utils.handlers.GCUBEServiceHandler
GCUBEServiceHandler.NoQueryResultException
 
Field Summary
 
Fields inherited from class org.gcube.common.core.utils.handlers.GCUBEHandler
handled, logger, producer
 
Constructor Summary
GCUBEStatefulServiceHandler()
          Creates an instance.
GCUBEStatefulServiceHandler(CLIENT client)
          Creates an instance to act on or on behalf of a service client.
 
Method Summary
protected  List<org.apache.axis.message.addressing.EndpointReferenceType> findInstances()
          Discovers EPRs to suitable instances of the target port-type.
protected abstract  List<RPDocument> findWSResources()
          Discovers suitable WS-Resources of the target port-type.
 
Methods inherited from class org.gcube.common.core.utils.handlers.GCUBEServiceHandler
_interact, cacheEPR, clearCachedEPR, getAttempts, getCachedEPR, getCacheKey, getInstances, getTargetPortTypeName, interact, run, setAttempts, tryInstances
 
Methods inherited from class org.gcube.common.core.utils.handlers.GCUBEHandler
clearBlackboard, getBlackboard, getHandled, getId, getLogger, getName, getScopeManager, getSecurityManager, getState, notify, setBlackboard, setHandled, setLogger, setName, setScopeManager, setSecurityManager, setState, subscribe, undo, unsubscribe
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.gcube.common.core.utils.handlers.lifetime.Lifetime
getState
 
Methods inherited from interface org.gcube.common.core.utils.handlers.GCUBEIHandler
clearBlackboard, getBlackboard, getHandled, getId, getLogger, getName, getScopeManager, getSecurityManager, setBlackboard, setHandled, setLogger, setName, setScopeManager, setSecurityManager, subscribe, undo, unsubscribe
 

Constructor Detail

GCUBEStatefulServiceHandler

public GCUBEStatefulServiceHandler()
Creates an instance.


GCUBEStatefulServiceHandler

public GCUBEStatefulServiceHandler(CLIENT client)
Creates an instance to act on or on behalf of a service client.

Parameters:
client - the client.
Method Detail

findInstances

protected final List<org.apache.axis.message.addressing.EndpointReferenceType> findInstances()
                                                                                      throws Exception
Discovers EPRs to suitable instances of the target port-type.

Specified by:
findInstances in class GCUBEServiceHandler<CLIENT extends GCUBEServiceClient>
Returns:
the EPRs.
Throws:
GCUBEServiceHandler.NoQueryResultException - if suitable instances cannot be found.
Exception

findWSResources

protected abstract List<RPDocument> findWSResources()
                                             throws Exception
Discovers suitable WS-Resources of the target port-type.

Returns:
the EPRs.
Throws:
Exception - if suitable instances cannot be found.


Copyright © 2013. All Rights Reserved.