public interface RemoteInvocationServiceQueue extends RemoteInvocationQueue, AbstractRemoteInvocationServiceCaller
remote invocation queue
based on
RemoteInvocationServiceCaller
.RemoteInvocationQueue
,
getServiceClient(Class, Class, Consumer, Consumer)
Modifier and Type | Method and Description |
---|---|
<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 . |
void |
setDefaultFailureCallback(Consumer<Throwable> failureCallback)
This method sets the
default failure callback . |
cancel, commit, getDefaultFailureCallback, getId, getState
void setDefaultFailureCallback(Consumer<Throwable> failureCallback)
default failure callback
.
If such callback has been set, invocations of getServiceClient(Class, Class, Consumer, Consumer)
may omit the failure callback by providing null
.setDefaultFailureCallback
in interface AttributeWriteDefaultFailureCallback
failureCallback
- is the new value of AttributeReadDefaultFailureCallback.getDefaultFailureCallback()
.<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
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
.setDefaultFailureCallback(Consumer)
<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
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.