TServiceInterface
- Interface exposed by the service.public interface IRpcClient<TServiceInterface> extends IAttachableDuplexOutputChannel
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
callRemoteMethod(java.lang.String methodName,
java.lang.Object[] args)
Calls a method in the service.
|
Event<DuplexChannelEventArgs> |
connectionClosed()
Event raised when the connection with the service is closed.
|
Event<DuplexChannelEventArgs> |
connectionOpened()
Event raised when the connection with the service is open.
|
TServiceInterface |
getProxy()
Returns service proxy instance.
|
void |
subscribeRemoteEvent(java.lang.String eventName,
EventHandler<?> eventHandler)
Subscribes to an event from the service.
|
void |
unsubscribeRemoteEvent(java.lang.String eventName,
EventHandler<?> eventHandler)
Unsubscribes from the event in the service.
|
attachDuplexOutputChannel, detachDuplexOutputChannel, getAttachedDuplexOutputChannel, isDuplexOutputChannelAttached
Event<DuplexChannelEventArgs> connectionOpened()
Event<DuplexChannelEventArgs> connectionClosed()
TServiceInterface getProxy()
void subscribeRemoteEvent(java.lang.String eventName, EventHandler<?> eventHandler) throws java.lang.Exception
eventName
- event name.eventHandler
- event handler that will handle events.java.lang.Exception
void unsubscribeRemoteEvent(java.lang.String eventName, EventHandler<?> eventHandler) throws java.lang.Exception
eventName
- event name.eventHandler
- event handler that shall be unsubscribed.java.lang.Exception
java.lang.Object callRemoteMethod(java.lang.String methodName, java.lang.Object[] args) throws java.lang.Exception
methodName
- name of the method that shall be called.args
- method arguments.java.lang.Exception