public class RpcClientCallState extends Object
| 构造器和说明 |
|---|
RpcClientCallState(com.google.protobuf.RpcCallback<RpcDataPackage> callback,
RpcDataPackage dataPackage,
io.netty.util.Timeout timeout)
Instantiates a new rpc client call state.
|
| 限定符和类型 | 方法和说明 |
|---|---|
com.google.protobuf.RpcCallback<RpcDataPackage> |
getCallback()
Gets the callback.
|
io.netty.channel.Channel |
getChannel()
Gets the channel.
|
RpcDataPackage |
getDataPackage()
Gets the data package.
|
long |
getStartTimestamp()
Gets the start timestamp.
|
io.netty.util.Timeout |
getTimeout()
Gets the timeout.
|
void |
handleFailure(int erroCode,
String message)
Handle failure.
|
void |
handleFailure(String message)
Handle failure.
|
void |
handleResponse(RpcDataPackage response)
Handle response.
|
void |
handleTimeout(long timeout,
TimeUnit timeUnit,
String message)
Handle timeout.
|
boolean |
isCurrentChannel(io.netty.channel.Channel channel)
Checks if is current channel.
|
void |
setCallback(com.google.protobuf.RpcCallback<RpcDataPackage> callback)
Sets the callback.
|
void |
setChannel(io.netty.channel.Channel channel)
Sets the channel.
|
void |
setDataPackage(RpcDataPackage dataPackage)
Sets the data package.
|
void |
setStartTimestamp(long startTimestamp)
Sets the start timestamp.
|
void |
setTimeout(io.netty.util.Timeout timeout)
Sets the timeout.
|
public RpcClientCallState(com.google.protobuf.RpcCallback<RpcDataPackage> callback, RpcDataPackage dataPackage, io.netty.util.Timeout timeout)
callback - the callbackdataPackage - the data packagetimeout - the timeoutpublic void setChannel(io.netty.channel.Channel channel)
channel - the new channelpublic io.netty.channel.Channel getChannel()
public boolean isCurrentChannel(io.netty.channel.Channel channel)
channel - the channelpublic com.google.protobuf.RpcCallback<RpcDataPackage> getCallback()
public void setCallback(com.google.protobuf.RpcCallback<RpcDataPackage> callback)
callback - the new callbackpublic long getStartTimestamp()
public void setStartTimestamp(long startTimestamp)
startTimestamp - the new start timestamppublic RpcDataPackage getDataPackage()
public void setDataPackage(RpcDataPackage dataPackage)
dataPackage - the new data packagepublic io.netty.util.Timeout getTimeout()
public void setTimeout(io.netty.util.Timeout timeout)
timeout - the new timeoutpublic void handleTimeout(long timeout,
TimeUnit timeUnit,
String message)
timeout - the timeouttimeUnit - the time unitpublic void handleFailure(int erroCode,
String message)
erroCode - the erro codemessage - the messagepublic void handleFailure(String message)
message - the messagepublic void handleResponse(RpcDataPackage response)
response - the responseCopyright © 2022 Baidu, Inc.. All rights reserved.