MethodDispatcherBase 类

定义

The base class used by remoting code generator to generate the type that dispatches requests from the client to the right interface and method of the remoted object.

public class MethodDispatcherBase implements MethodDispatcher
继承
java.lang.Object
MethodDispatcherBase

方法

continueWith(CompletableFuture<?> future)

Internal - used by Service remoting

continueWithResult(int methodId, CompletableFuture<TRetval> future)

Internal - used by Service remoting

createResponseBody(int methodId, Object returnValue)

This method is implemented by the generated method dispatcher to create the response from the specified return value as a result of dispatching the method to the remoted object.

createResponseMessageBody(Object responseMessageBodyValue)

This method is implemented by the generated method to create the response message.

dispatch(Object objectImplementation, int methodId, Object requestMsgBody)

This method is used to dispatch one way messages to the specified methodId of the interface implemented by the remoted object.

dispatchAsync(Object objectImplementation, int methodId, Object requestMsgBody, CancellationToken cancellationToken)

This method is implemented by the generated method dispatcher to dispatch request to the specified methodId of the interface implemented by the remoted object.

getInterfaceId()

Interface Id is used to identify remoting Interfaces.

getMethodName(int methodId)
getRequestMessageBodyValue(Object requestMessageBody)

This method is implemented by the generated method dispatcher to get the request message,

initialize(int interfaceId, Map<Integer, String> methodNameMap)
onDispatch(int methodId, Object remotedObject, Object requestBody)

This method is implemented by the generated method dispatcher to dispatch one way messages to the specified methodId of the interface implemented by the remoted object.

onDispatchAsync(int methodId, Object remotedObject, Object requestBody, CancellationToken cancellationToken)

This method is implemented by the generated method dispatcher to dispatch request to the specified methodId of the interface implemented by the remoted object.

适用于