ProxyBase Class
- java.
lang. Object - microsoft.
servicefabric. services. remoting. builder. ProxyBase
- microsoft.
public class ProxyBase
The base class used by remoting code generator to generate the proxy for the remoted interfaces.
Constructor Summary
Constructor | Description |
---|---|
ProxyBase() |
Initializes a new instance of the ProxyBase class. |
Method Summary
Modifier and Type | Method and Description |
---|---|
CompletableFuture<?> |
continueWith(CompletableFuture<Object> future)
Called by the generated proxy class to continue after getting the response body that does not have value. |
<T> CompletableFuture<T> |
continueWithResult(int interfaceId, int methodId, CompletableFuture<Object> future)
Called by the generated proxy class to get the result from the response body. |
abstract Object |
createRequestMessageBody(Object requestMessageBodyValue)
Create the remoting request message body. |
abstract Object |
deserializeMessage(byte[] msgBodyValue)
Deserialize method. |
abstract Object |
getResponseMessageBodyValue(Object responseMessageBody)
Get the response of the request to remote object. |
abstract Object |
getReturnValue(int interfaceId, int methodId, Object responseBody)
Implemented by the derived class to type cast the response body and extract the value from it. |
abstract void |
invoke(int interfaceId, int methodId, byte[] requestMsgBodyBytes)
Called by the generated proxy class to send the message to the remote object. |
void |
invoke(int interfaceId, int methodId, Object requestMsgBodyValue)
Called by the generated proxy class to send the message to the remote object. |
abstract CompletableFuture<byte[]> |
invokeAsync(int interfaceId, int methodId, byte[] requestMsgBodyBytes, CancellationToken cancellationToken)
Called by the generated proxy class to send the request to the remote object and get the response back. |
CompletableFuture<Object> |
invokeAsync(int interfaceId, int methodId, Object requestMsgBodyValue, CancellationToken cancellationToken)
Called by the generated proxy class to send the request to the remote object and get the response back. |
abstract byte [] |
serializeMessage(Object msgBodyValue)
Serializes the given Object |
Constructor Details
ProxyBase
protected ProxyBase()
Initializes a new instance of the ProxyBase class.
Method Details
continueWith
protected CompletableFuture> continueWith(CompletableFuture
Called by the generated proxy class to continue after getting the response body that does not have value.
Parameters:
Returns:
continueWithResult
protected
Called by the generated proxy class to get the result from the response body.
Parameters:
Returns:
createRequestMessageBody
protected abstract Object createRequestMessageBody(Object requestMessageBodyValue)
Create the remoting request message body.
Parameters:
Returns:
deserializeMessage
protected abstract Object deserializeMessage(byte[] msgBodyValue)
Deserialize method.
Parameters:
Returns:
getResponseMessageBodyValue
protected abstract Object getResponseMessageBodyValue(Object responseMessageBody)
Get the response of the request to remote object.
Parameters:
Returns:
getReturnValue
protected abstract Object getReturnValue(int interfaceId, int methodId, Object responseBody)
Implemented by the derived class to type cast the response body and extract the value from it.
Parameters:
Returns:
invoke
protected abstract void invoke(int interfaceId, int methodId, byte[] requestMsgBodyBytes)
Called by the generated proxy class to send the message to the remote object.
Parameters:
invoke
protected void invoke(int interfaceId, int methodId, Object requestMsgBodyValue)
Called by the generated proxy class to send the message to the remote object.
Parameters:
invokeAsync
protected abstract CompletableFuture
Called by the generated proxy class to send the request to the remote object and get the response back.
Parameters:
Returns:
invokeAsync
protected CompletableFuture
Called by the generated proxy class to send the request to the remote object and get the response back.
Parameters:
CancellationToken object to indicate the cancellation status of the operation.
Returns:
serializeMessage
protected abstract byte [] serializeMessage(Object msgBodyValue)
Serializes the given Object
Parameters:
Returns:
Applies to
Azure SDK for Java
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for