Class StatelessRemoteRunner
- java.lang.Object
-
- org.marketcetera.util.ws.stateless.StatelessRemoteCall
-
- org.marketcetera.util.ws.stateless.StatelessRemoteRunner
-
public abstract class StatelessRemoteRunner extends StatelessRemoteCall
An implementation wrapper for stateless services. The wrapped call is implemented by overridingrun(StatelessClientContext).- Since:
- 1.0.0
- Version:
- $Id: StatelessRemoteRunner.java 16154 2012-07-14 16:34:05Z colin $
- Author:
- tlerios@marketcetera.com
-
-
Field Summary
-
Fields inherited from class org.marketcetera.util.ws.stateless.StatelessRemoteCall
DEFAULT_VERSION_FILTER
-
-
Constructor Summary
Constructors Constructor Description StatelessRemoteRunner()Creates a new wrapper which applies a single filter to the client context.StatelessRemoteRunner(TagFilter versionIdFilter, TagFilter appIdFilter, TagFilter clientIdFilter)Creates a new wrapper which applies the given filters to the client context.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidexecute(StatelessClientContext context)Invokes the service implementation on behalf of the client with the given context.protected abstract voidrun(StatelessClientContext context)The service implementation, executed on behalf of the client with the given context.-
Methods inherited from class org.marketcetera.util.ws.stateless.StatelessRemoteCall
assertFilterMatch, assertFilterMatch, getAppIdFilter, getClientIdFilter, getVersionIdFilter, handleSuccess, startCall, wrapFailure
-
-
-
-
Constructor Detail
-
StatelessRemoteRunner
public StatelessRemoteRunner(TagFilter versionIdFilter, TagFilter appIdFilter, TagFilter clientIdFilter)
Creates a new wrapper which applies the given filters to the client context.- Parameters:
versionIdFilter- The version ID filter, which may be null.appIdFilter- The application ID filter, which may be null.clientIdFilter- The client ID filter, which may be null.
-
StatelessRemoteRunner
public StatelessRemoteRunner()
Creates a new wrapper which applies a single filter to the client context. That filter ensures that the client's version ID is equal to the server's version ID.
-
-
Method Detail
-
execute
public void execute(StatelessClientContext context) throws RemoteException
Invokes the service implementation on behalf of the client with the given context.- Parameters:
context- The context.- Throws:
RemoteException- Thrown if the implementation fails; it wraps the throwable thrown by the actual implementation.
-
run
protected abstract void run(StatelessClientContext context) throws Exception
The service implementation, executed on behalf of the client with the given context.- Parameters:
context- The context.- Throws:
Exception- Thrown if the implementation fails.
-
-