CLIENT - the type of the handled object. It must implement the GCUBEServiceClient interface.public abstract class GCUBEStagingServiceHandler<CLIENT extends GCUBEServiceClient> extends GCUBEStatefulServiceHandler<CLIENT>
GCUBEStatefulServiceHandler which extends its best-attempt strategy
to the case in which instances of the target port-type can be created through factory port-types.
The strategy extends GCUBEStatefulServiceHandler's by:
(1) Discovering factories whenever no instance can be found of the target port-type;
(2) Interacting with each factory to create an instance of the target port-type, until one instance has been created;
(3) Interacting with the created instance of the target port-type.
To completely define strategy, subclasses must implement the abstract methods required by GCUBEStatefulServiceHandler
as well as the following abstract methods:
(a) findFactories() to discover factories;
(b) createInstance(EndpointReferenceType) to interact with a factory to create an instance of the target port-type;
GCUBEServiceHandler.NoQueryResultExceptionhandled, logger, producer| Constructor and Description |
|---|
GCUBEStagingServiceHandler()
Creates an instance.
|
GCUBEStagingServiceHandler(CLIENT client)
Creates an instance to act on or on behalf of a service client.
|
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.axis.message.addressing.EndpointReferenceType |
_createInstance(org.apache.axis.message.addressing.EndpointReferenceType epr)
Used internally to wrap
createInstance(EndpointReferenceType) and handle its failures.If createInstance(EndpointReferenceType) fails with a GCUBEFault, it propagates the
GCUBEException which models the fault most specifically. |
protected abstract org.apache.axis.message.addressing.EndpointReferenceType |
createInstance(org.apache.axis.message.addressing.EndpointReferenceType epr)
Interacts with a factory to create an instance of the target port-type.
|
protected abstract List<org.apache.axis.message.addressing.EndpointReferenceType> |
findFactories()
Returns a list of EPRs to factories.
|
protected List<org.apache.axis.message.addressing.EndpointReferenceType> |
getFactories()
Returns a non-empty list of EPRs to factories.
|
protected List<org.apache.axis.message.addressing.EndpointReferenceType> |
getInstances()
Returns a non-empty list of EPRs to instances of the target port-type.
|
protected org.apache.axis.message.addressing.EndpointReferenceType |
tryFactories(List<org.apache.axis.message.addressing.EndpointReferenceType> eprs)
Interacts with a list of factories to spawn an instance of the target port-type.
|
findInstances, findWSResources_interact, cacheEPR, clearCachedEPR, getAttempts, getCachedEPR, getCacheKey, getTargetPortTypeName, interact, run, setAttempts, tryInstancesclearBlackboard, getBlackboard, getHandled, getId, getLogger, getName, getScopeManager, getSecurityManager, getState, notify, setBlackboard, setHandled, setLogger, setName, setScopeManager, setSecurityManager, setState, subscribe, undo, unsubscribeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclearBlackboard, getBlackboard, getHandled, getId, getLogger, getName, getScopeManager, getSecurityManager, setBlackboard, setHandled, setLogger, setName, setScopeManager, setSecurityManager, subscribe, undo, unsubscribepublic GCUBEStagingServiceHandler()
public GCUBEStagingServiceHandler(CLIENT client)
client - the client.protected List<org.apache.axis.message.addressing.EndpointReferenceType> getInstances() throws Exception
getInstances() or, if none is returned, the single
instance spawned as the result of the first successful interaction with a factory returned by
getFactories().getInstances in class GCUBEServiceHandler<CLIENT extends GCUBEServiceClient>Exception - if no EPRs can be returned.protected org.apache.axis.message.addressing.EndpointReferenceType tryFactories(List<org.apache.axis.message.addressing.EndpointReferenceType> eprs) throws Exception
eprs - the EPRs of the factories.Exception - if no interaction is successful.protected List<org.apache.axis.message.addressing.EndpointReferenceType> getFactories() throws Exception, GCUBEServiceHandler.NoQueryResultException
NoQueryResultException - if no factory can be found.Exception - if no EPR can be returned.GCUBEServiceHandler.NoQueryResultExceptionprotected org.apache.axis.message.addressing.EndpointReferenceType _createInstance(org.apache.axis.message.addressing.EndpointReferenceType epr)
throws Exception
createInstance(EndpointReferenceType) and handle its failures.createInstance(EndpointReferenceType) fails with a GCUBEFault, it propagates the
GCUBEException which models the fault most specifically.epr - the EPR of a factory.Exception - if no instance could be created.createInstance(EndpointReferenceType)protected abstract List<org.apache.axis.message.addressing.EndpointReferenceType> findFactories() throws Exception
Exception - if no EPR can be returned.protected abstract org.apache.axis.message.addressing.EndpointReferenceType createInstance(org.apache.axis.message.addressing.EndpointReferenceType epr)
throws Exception
epr - the EPR of the factory.Exception - if the interaction does not complete successfully.Copyright © 2015. All Rights Reserved.