protected class AbstractRemoteInvocationServiceCaller.RemoteInvocationServiceQueueImpl extends AbstractRemoteInvocationCaller.AbstractRemoteInvocationQueue implements RemoteInvocationServiceQueue
RemoteInvocationServiceQueue
.Modifier and Type | Field and Description |
---|---|
private AbstractRemoteInvocationServiceCaller.ServiceCallData<?> |
currentCall
The current
AbstractRemoteInvocationServiceCaller.ServiceCallData or null . |
Constructor and Description |
---|
RemoteInvocationServiceQueueImpl(RemoteInvocationQueueSettings settings)
The constructor.
|
RemoteInvocationServiceQueueImpl(RemoteInvocationQueueSettings settings,
AbstractRemoteInvocationServiceCaller.RemoteInvocationServiceQueueImpl parentQueue)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addCall(GenericRemoteInvocationRpcCall call,
Class<?> returnType)
This method adds the given
GenericRemoteInvocationRpcCall to this queue. |
<SERVICE extends RemoteInvocationService,RESULT> |
getServiceClient(Class<SERVICE> serviceInterface,
Class<RESULT> returnType,
Consumer<? extends RESULT> successCallback)
|
<SERVICE extends RemoteInvocationService,RESULT> |
getServiceClient(Class<SERVICE> serviceInterface,
Class<RESULT> returnType,
Consumer<? extends RESULT> successCallback,
Consumer<Throwable> failureCallback)
This method gets a client-stub for calling exactly one single method on a
RemoteInvocationService . |
addCall, cancel, commit, getCallQueue, getDefaultFailureCallback, getId, getIdInfo, getParentQueue, getSettings, getState, requireNoChildQueue, requireNoCurrentCall, requireOpen, setDefaultFailureCallback
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setDefaultFailureCallback
cancel, commit, getDefaultFailureCallback, getId, getState
private AbstractRemoteInvocationServiceCaller.ServiceCallData<?> currentCall
AbstractRemoteInvocationServiceCaller.ServiceCallData
or null
.public RemoteInvocationServiceQueueImpl(RemoteInvocationQueueSettings settings)
settings
- - see AbstractRemoteInvocationCaller.AbstractRemoteInvocationQueue.getSettings()
.public RemoteInvocationServiceQueueImpl(RemoteInvocationQueueSettings settings, AbstractRemoteInvocationServiceCaller.RemoteInvocationServiceQueueImpl parentQueue)
settings
- - see AbstractRemoteInvocationCaller.AbstractRemoteInvocationQueue.getSettings()
.parentQueue
- - see AbstractRemoteInvocationCaller.AbstractRemoteInvocationQueue.getParentQueue()
.protected void addCall(GenericRemoteInvocationRpcCall call, Class<?> returnType)
GenericRemoteInvocationRpcCall
to this queue.call
- is the GenericRemoteInvocationRpcCall
to add.returnType
- is the return type
of the invoked
Method
.public <SERVICE extends RemoteInvocationService,RESULT> SERVICE getServiceClient(Class<SERVICE> serviceInterface, Class<RESULT> returnType, Consumer<? extends RESULT> successCallback)
AbstractRemoteInvocationServiceCaller.getServiceClient(Class, Class, Consumer, Consumer)
but using the
default
failure callback
.
committed
. This allows multiple invocations of this method and subsequent
service method calls in order to collect service invocations that shall be send to the server within the
same technical request.getServiceClient
in interface AbstractRemoteInvocationServiceCaller
getServiceClient
in interface RemoteInvocationServiceQueue
SERVICE
- is the generic type of serviceInterface
.RESULT
- is the generic type of returnType
.serviceInterface
- is the interface of the RemoteInvocationService
.returnType
- is the return type
of the
Method
to invoke.successCallback
- is the Consumer
that is asynchronously invoked
on success with when the result of the invoked service Method
has been received. The generic type may extend result if it is generic itself. E.g. your service
might return List<String>
but you can only supply List.class
as
return type.RemoteInvocationService
.RemoteInvocationServiceQueue.setDefaultFailureCallback(Consumer)
public <SERVICE extends RemoteInvocationService,RESULT> SERVICE getServiceClient(Class<SERVICE> serviceInterface, Class<RESULT> returnType, Consumer<? extends RESULT> successCallback, Consumer<Throwable> failureCallback)
RemoteInvocationService
. After this method has been called, the intended method (with the given
returnType
) has to be invoked on the resulting client-stub exactly once. This records the
desired method invocation and returns a dummy result (typically null
) that shall be ignored.
committed
. This allows multiple invocations of this method and subsequent
service method calls in order to collect service invocations that shall be send to the server within the
same technical request.getServiceClient
in interface AbstractRemoteInvocationServiceCaller
getServiceClient
in interface RemoteInvocationServiceQueue
SERVICE
- is the generic type of serviceInterface
.RESULT
- is the generic type of returnType
.serviceInterface
- is the interface of the RemoteInvocationService
.returnType
- is the return type
of the
Method
to invoke.successCallback
- is the Consumer
that is asynchronously invoked
on success with when the result of the invoked service Method
has been received. The generic type may extend result if it is generic itself. E.g. your service
might return List<String>
but you can only supply List.class
as
return type.failureCallback
- is the Consumer
that is asynchronously invoked
on failure with the Throwable
that occurred when calling the invoked service
Method
.RemoteInvocationService
.Copyright © 2001–2016 mmm-Team. All rights reserved.