org.gcube.common.core.utils.calls
Class WSCall.WSCallHandler
java.lang.Object
org.gcube.common.core.utils.handlers.GCUBEHandler<CLIENT>
org.gcube.common.core.utils.handlers.GCUBEServiceHandler<CLIENT>
org.gcube.common.core.utils.handlers.GCUBEStatefulServiceHandler<GCUBEServiceClientImpl>
org.gcube.common.core.utils.calls.WSCall.WSCallHandler
- All Implemented Interfaces:
- GCUBEIHandler<GCUBEServiceClientImpl>, Lifetime<GCUBEServiceClientImpl>
- Enclosing class:
- WSCall
public abstract class WSCall.WSCallHandler
- extends GCUBEStatefulServiceHandler<GCUBEServiceClientImpl>
Abstract specialisation of GCUBEStatefulServiceHandler for embedding in WSCalls.
- Author:
- Fabio Simeoni (University of Strathclyde)
| Methods inherited from class org.gcube.common.core.utils.handlers.GCUBEHandler |
clearBlackboard, getBlackboard, getHandled, getId, getLogger, getName, 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, getSecurityManager, setBlackboard, setHandled, setLogger, setName, setScopeManager, setSecurityManager, subscribe, undo, unsubscribe |
WSCall.WSCallHandler
public WSCall.WSCallHandler()
- Creates a new instance.
_interact
protected void _interact(org.apache.axis.message.addressing.EndpointReferenceType epr)
throws Exception
- Used internally to wrap
GCUBEServiceHandler.interact(EndpointReferenceType) and handle its successes and failures.
If GCUBEServiceHandler.interact(EndpointReferenceType) succeeds, it store the input EPR
in the handler's state. If GCUBEServiceHandler.interact(EndpointReferenceType) fails with a GCUBEFault,
it propagates the GCUBEException which models it most specifically.
- Overrides:
_interact in class GCUBEServiceHandler<GCUBEServiceClientImpl>
- Parameters:
epr - the EPR of an instance of the target port-type.
- Throws:
GCUBEServiceHandler.NoQueryResultException - if the interaction fails to complete successfully.
Exception- See Also:
GCUBEServiceHandler.interact(EndpointReferenceType).
getCachedEPR
protected org.apache.axis.message.addressing.EndpointReferenceType getCachedEPR()
- Returns the EPR of the instance of the target port-type which was last cached.
- Overrides:
getCachedEPR in class GCUBEServiceHandler<GCUBEServiceClientImpl>
- Returns:
- the EPR.
getTargetPortTypeName
protected String getTargetPortTypeName()
- Returns the local name of the target port-type as the basis for a key to store 'successful'
EPRs of the port-type in the cache provided by the service client (cf.
GCUBEServiceHandler.getCacheKey()).
By default, it returns the name of handler (cf. GCUBEHandler.getName()), which will not grant EPR reuse
across any other handler type that may target the same port-type. Override and return a specific port-type name
to grant EPR reuse across all handler types that target the same port-type and share the same client.
- Overrides:
getTargetPortTypeName in class GCUBEServiceHandler<GCUBEServiceClientImpl>
- Returns:
- the name.
- See Also:
#getName()},
#getCacheKey()}.
getScopeManager
public GCUBEScopeManager getScopeManager()
- Returns the scope manager of the handler.
- Specified by:
getScopeManager in interface GCUBEIHandler<GCUBEServiceClientImpl>- Overrides:
getScopeManager in class GCUBEHandler<GCUBEServiceClientImpl>
- Returns:
- the manager.
findWSResources
protected List<RPDocument> findWSResources()
throws Exception
- Discovers suitable WS-Resources of the target port-type.
- Specified by:
findWSResources in class GCUBEStatefulServiceHandler<GCUBEServiceClientImpl>
- Returns:
- the EPRs.
- Throws:
Exception - if suitable instances cannot be found.
Copyright © 2012. All Rights Reserved.