public <T, R> T call(final RemoteCallback<R> callback, final Class<T> remoteService) { return call(callback, null, remoteService); }
/** * Creates an RPC call, with no error handling. * * @param callback * The remote callback that receives the return value from the call. Cannot not be null. * @param service * The remote interface. * @param <T> * The type of the remote service. * @param <R> * The return type of the invoked method. * @return A proxy for the remote service. Methods invoked on this object will communicate with the remote service * over the message bus. */ public static <R, T> T createCall(final RemoteCallback<R> callback, final Class<T> service) { return new DefaultRemoteCallBuilder(CommandMessage.create()).call(callback, service); }
/** * Creates an RPC call with error handling. * * @param callback * The remote callback that receives the return value from the call. Cannot not be null. * @param errorCallback * The error callback that receives transmission errors and exceptions thrown by the remote service. Cannot not be null. * @param service * The remote interface. * @param <T> * The type of the remote service. * @param <R> * The return type of the invoked method. * @return A proxy for the remote service. Methods invoked on this object will communicate with the remote service * over the message bus. */ public static <R, T> T createCall(final RemoteCallback<R> callback, final BusErrorCallback errorCallback, final Class<T> service) { return new DefaultRemoteCallBuilder(CommandMessage.create()).call(callback, errorCallback, service); }
public <T, R> T call(final RemoteCallback<R> callback, final Class<T> remoteService) { return call(callback, null, remoteService); }
/** * Creates an RPC call, with no error handling. * * @param callback * The remote callback that receives the return value from the call. Cannot not be null. * @param service * The remote interface. * @param <T> * The type of the remote service. * @param <R> * The return type of the invoked method. * @return A proxy for the remote service. Methods invoked on this object will communicate with the remote service * over the message bus. */ public static <R, T> T createCall(final RemoteCallback<R> callback, final Class<T> service) { return new DefaultRemoteCallBuilder(CommandMessage.create()).call(callback, service); }
/** * Creates an RPC call with error handling. * * @param callback * The remote callback that receives the return value from the call. Cannot not be null. * @param errorCallback * The error callback that receives transmission errors and exceptions thrown by the remote service. Cannot not be null. * @param service * The remote interface. * @param <T> * The type of the remote service. * @param <R> * The return type of the invoked method. * @return A proxy for the remote service. Methods invoked on this object will communicate with the remote service * over the message bus. */ public static <R, T> T createCall(final RemoteCallback<R> callback, final BusErrorCallback errorCallback, final Class<T> service) { return new DefaultRemoteCallBuilder(CommandMessage.create()).call(callback, errorCallback, service); }