public interface RemoteReference extends RemoteObject
getUniHostReference and getUniRoleReference methods of BackendRPCService.
All other methods returns multicast references, even if they refers to a single service.
Depending of the method result type multicast reference invocation returns the result of
a method call as follows:
void - returns null
null, it is skipped - the same as if it returns zero size array.
Enumerator - returns Enumerator which returns the elements of the
corresponding multiple enumerators as a merged/concatenated sequence.
| Modifier and Type | Method and Description |
|---|---|
RemoteMethod |
getMethod(java.lang.String methodName,
java.lang.Class[] argTypes)
Returns remote method with a given name and argument types, defined in the object
referred by this remote reference.
|
java.lang.Object |
invoke(java.lang.String methodName,
java.lang.Class[] argTypes,
java.lang.Object[] args)
Performs remote call to the referred service(s).
|
void |
invoke(java.lang.String methodName,
java.lang.Class[] argTypes,
java.lang.Object[] args,
AsyncEnumeratorResultCallback callback)
This method is similar to
invoke(java.lang.String methodName, java.lang.Class[] argTypes, java.lang.Object[] args, com.prosyst.mprm.backend.rpc.AsyncResultCallback callback)
but can be used for calling methods which produce Enumerator results. |
void |
invoke(java.lang.String methodName,
java.lang.Class[] argTypes,
java.lang.Object[] args,
AsyncResultCallback callback)
Performs asynchronous remote call to the referred service(s).
|
<T> java.util.List<T> |
invokeWithTimeout(java.lang.String methodName,
java.lang.Class[] argTypes,
java.lang.Object[] args,
int timeout)
Performs remote call to the referred service(s) in parallel.
|
Enumerator |
sortedInvoke(java.lang.String methodName,
java.lang.Class[] argTypes,
java.lang.Object[] args,
boolean inc)
Performs remote call to the referred service(s) and merges the result.
|
void |
sortedInvoke(java.lang.String methodName,
java.lang.Class[] argTypes,
java.lang.Object[] args,
boolean inc,
AsyncEnumeratorResultCallback callback)
Represents the asynchronous version of method
sortedInvoke(java.lang.String methodName, java.lang.Class[] argTypes, java.lang.Object[] args, boolean inc). |
dispose, getMethod, getMethodsjava.lang.Object invoke(java.lang.String methodName,
java.lang.Class[] argTypes,
java.lang.Object[] args)
throws RPCException
methodName - the name of the remote method.argTypes - classes of the method parameters.args - actual arguments used for method invocation.RPCException - if some system level error occurs or if some of the referred services has
thrown an exception. If the reference is multicast reference then this exception
holds partial result if any (if some of the service instances has returned with success).<T> java.util.List<T> invokeWithTimeout(java.lang.String methodName,
java.lang.Class[] argTypes,
java.lang.Object[] args,
int timeout)
throws RPCException
methodName - the name of the remote method.argTypes - classes of the method parameters.args - actual arguments used for method invocation.timeout - timeout for RPC call in seconds.RPCException - if some system level error occurs or if some of the referred services has
thrown an exception. If the reference is multicast reference then this exception
holds partial result if any (if some of the service instances has returned with success).void invoke(java.lang.String methodName,
java.lang.Class[] argTypes,
java.lang.Object[] args,
AsyncResultCallback callback)
callback argument
later (when it becomes available).methodName - the name of the remote method.argTypes - classes of the method parameters.args - actual arguments used for method invocation.callback - the call-back instance implemented by the caller application, which
will be used by the RCP service to supply the result of the RPC method call.void invoke(java.lang.String methodName,
java.lang.Class[] argTypes,
java.lang.Object[] args,
AsyncEnumeratorResultCallback callback)
invoke(java.lang.String methodName, java.lang.Class[] argTypes, java.lang.Object[] args, com.prosyst.mprm.backend.rpc.AsyncResultCallback callback)
but can be used for calling methods which produce Enumerator results.methodName - the name of the remote method.argTypes - classes of the method parameters.args - actual arguments used for method invocation.callback - the call-back instance implemented by the caller application, which
will be used by the RCP service to supply the result of the RPC method call.Enumerator sortedInvoke(java.lang.String methodName, java.lang.Class[] argTypes, java.lang.Object[] args, boolean inc) throws RPCException
Comparable
and are sorted in the same order as specified by the 'inc' argument.
This method returns merged Enumerator with elements sorted in the same order.methodName - the name of the remote method.argTypes - classes of the method parameters.args - actual arguments used for method invocation.inc - if true than the enumeration is in increasing order, false - decreasing.RPCException - if some system level error occurs or if some of the referred services has
thrown an exception. If the reference is multicast reference then this exception
holds partial result if any (if some of the service instances has returned with success).
The partial result is Enumerator object.void sortedInvoke(java.lang.String methodName,
java.lang.Class[] argTypes,
java.lang.Object[] args,
boolean inc,
AsyncEnumeratorResultCallback callback)
sortedInvoke(java.lang.String methodName, java.lang.Class[] argTypes, java.lang.Object[] args, boolean inc).
For information about asynchronous calling refer to invoke(java.lang.String methodName, java.lang.Class[] argTypes, java.lang.Object[] args, com.prosyst.mprm.backend.rpc.AsyncEnumeratorResultCallback callback).methodName - the name of the remote method.argTypes - classes of the method parameters.args - actual arguments used for method invocation.inc - if true than the enumeration is in increasing order, false - decreasing.RemoteMethod getMethod(java.lang.String methodName, java.lang.Class[] argTypes) throws RPCException
methodName - the name of the methodargTypes - the types of the method argumentscom.prosyst.mbs.services.pmp.RemoteMethod instance which could be used for
multiple calls of the corresponding method.RPCException - if there is no such method or a system level error occurs.Copyright © 2019 Bosch Software Innovations GmbH. All Rights Reserved.