public class TripleClientCall extends Object implements ClientCall, ClientStream.Listener
ClientCall.Listener| Constructor and Description |
|---|
TripleClientCall(org.apache.dubbo.remoting.api.Connection connection,
Executor executor,
org.apache.dubbo.rpc.model.FrameworkModel frameworkModel) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancelByLocal(Throwable t)
Send reset to server, no more data will be sent or received.
|
void |
halfClose()
No more data will be sent.
|
boolean |
isAutoRequest() |
void |
onCancelByRemote(TriRpcStatus status)
Callback when receive cancel signal.
|
void |
onComplete(TriRpcStatus status,
Map<String,Object> attachments,
Map<String,String> excludeHeaders)
Callback when request completed.
|
void |
onMessage(byte[] message)
Callback when receive message.
|
void |
onStart()
Callback when stream started.
|
void |
request(int messageNumber)
Request max n message from server
|
void |
sendMessage(Object message)
Send message to server
|
void |
setAutoRequest(boolean autoRequest)
Set auto request for this call
|
void |
setCompression(String compression)
Set compression algorithm for request.
|
org.apache.dubbo.common.stream.StreamObserver<Object> |
start(RequestMetadata metadata,
ClientCall.Listener responseListener) |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonCompletepublic TripleClientCall(org.apache.dubbo.remoting.api.Connection connection,
Executor executor,
org.apache.dubbo.rpc.model.FrameworkModel frameworkModel)
public void onMessage(byte[] message)
Stream.ListeneronMessage in interface Stream.Listenermessage - message received from remote peerpublic void onCancelByRemote(TriRpcStatus status)
Stream.ListeneronCancelByRemote in interface Stream.Listenerstatus - the cancel statuspublic void onComplete(TriRpcStatus status, Map<String,Object> attachments, Map<String,String> excludeHeaders)
ClientStream.ListeneronComplete in interface ClientStream.Listenerstatus - response statusattachments - attachments received from remote peerexcludeHeaders - triple protocol reserved datapublic void onStart()
ClientStream.ListeneronStart in interface ClientStream.Listenerpublic void cancelByLocal(Throwable t)
ClientCallcancelByLocal in interface ClientCallt - causepublic void request(int messageNumber)
ClientCallrequest in interface ClientCallmessageNumber - max message numberpublic void sendMessage(Object message)
ClientCallsendMessage in interface ClientCallmessage - request to sendpublic void halfClose()
ClientCallhalfClose in interface ClientCallpublic void setCompression(String compression)
ClientCallsetCompression in interface ClientCallcompression - compression algorithmpublic org.apache.dubbo.common.stream.StreamObserver<Object> start(RequestMetadata metadata, ClientCall.Listener responseListener)
start in interface ClientCallmetadata - request metadataresponseListener - the listener to receive responsepublic boolean isAutoRequest()
isAutoRequest in interface ClientCallpublic void setAutoRequest(boolean autoRequest)
ClientCallsetAutoRequest in interface ClientCallautoRequest - whether auto request is enabledCopyright © 2011–2022 The Apache Software Foundation. All rights reserved.