DataCallback¶
-
public abstract class
DataCallback<ReplyType, RequestType> implements Callback¶ Implement the user behavior for a
LocalServermethod with a simple signature without events. This makes implementing callbacks simple, because no RSBEventinstances need to be used. However, this e.g. prevents setting timestamps or further meta data of events. If you need such a behavior, please useEventCallback. In case you either do not need a request paramter or do not return any data, specify the respective java generics parameter asVoid. You can then safely returnnullif you have no result. In other cases,nullis explicitly not allowed. TODO check the null assumption- Author
jmoringe, jwienke
- Parameters
<ReplyType> – The type of data produced as replies to the implemented functionality.
<RequestType> – The type of data required as request parameter
Methods¶
invoke¶
-
public abstract ReplyType
invoke(RequestType request)¶ This method is called to invoke the actual behavior of an exposed method. Implementing user code must not swallow interruption state. Instead, it has to be passed to the outside world through an
InterruptedException.- Parameters
request – The argument passed to the associated method by the remote caller.
- Throws
InterruptedException – Indicates that the operation was interrupted.
Exception – Can throw anything.
- Returns
A result that should be returned to the remote caller as the result of the calling the method.