MethodDispatcherBase Class
- java.
lang. Object - MethodDispatcher
- microsoft.
servicefabric. services. remoting. builder. MethodDispatcherBase
- microsoft.
public class MethodDispatcherBase implements MethodDispatcher
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.
Method Summary
Modifier and Type | Method and Description |
---|---|
CompletableFuture<Object> |
continueWith(CompletableFuture<?> future)
Internal - used by Service remoting |
<TRetval> CompletableFuture<Object> |
continueWithResult(int methodId, CompletableFuture<TRetval> future)
Internal - used by Service remoting |
abstract Object |
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. |
abstract Object |
createResponseMessageBody(Object responseMessageBodyValue)
This method is implemented by the generated method to create the response message. |
void |
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. |
CompletableFuture<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. |
int |
getInterfaceId()
Interface Id is used to identify remoting Interfaces. |
String | getMethodName(int methodId) |
abstract Object |
getRequestMessageBodyValue(Object requestMessageBody)
This method is implemented by the generated method dispatcher to get the request message, |
void | initialize(int interfaceId, Map<Integer, String> methodNameMap) |
abstract void |
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. |
abstract CompletableFuture<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. |
Method Details
continueWith
protected CompletableFuture
Internal - used by Service remoting
Parameters:
Returns:
continueWithResult
protected
Internal - used by Service remoting
Parameters:
Returns:
createResponseBody
protected abstract Object 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.
Parameters:
Returns:
createResponseMessageBody
protected abstract Object createResponseMessageBody(Object responseMessageBodyValue)
This method is implemented by the generated method to create the response message.
Parameters:
Returns:
Object that represents the respnse messge body.
dispatch
public void 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.
Overrides:
MethodDispatcherBase.dispatch(Object objectImplementation, int methodId, Object requestMsgBody)Parameters:
dispatchAsync
public CompletableFuture
This method is implemented by the generated method dispatcher to dispatch request to the specified methodId of the interface implemented by the remoted object.
Overrides:
MethodDispatcherBase.dispatchAsync(Object objectImplementation, int methodId, Object requestMsgBody, CancellationToken cancellationToken)Parameters:
Returns:
getInterfaceId
public int getInterfaceId()
Interface Id is used to identify remoting Interfaces.
Overrides:
MethodDispatcherBase.getInterfaceId()Returns:
getMethodName
public String getMethodName(int methodId)
Overrides:
MethodDispatcherBase.getMethodName(int methodId)Parameters:
getRequestMessageBodyValue
protected abstract Object getRequestMessageBodyValue(Object requestMessageBody)
This method is implemented by the generated method dispatcher to get the request message,
Parameters:
Returns:
initialize
public void initialize(int interfaceId, Map
Parameters:
onDispatch
protected abstract void 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.
Parameters:
onDispatchAsync
protected abstract CompletableFuture
This method is implemented by the generated method dispatcher to dispatch request to the specified methodId of the interface implemented by the remoted object.
Parameters:
Returns:
Applies to
Azure SDK for Java
Comentarios
https://aka.ms/ContentUserFeedback.
Próximamente: A lo largo de 2024 iremos eliminando gradualmente las Cuestiones de GitHub como mecanismo de retroalimentación para el contenido y lo sustituiremos por un nuevo sistema de retroalimentación. Para más información, consulta:Enviar y ver comentarios de