public class RemotingContext extends Object
| 构造器和说明 |
|---|
RemotingContext(io.netty.channel.ChannelHandlerContext ctx)
Constructor.
|
RemotingContext(io.netty.channel.ChannelHandlerContext ctx,
boolean serverSide)
Constructor.
|
RemotingContext(io.netty.channel.ChannelHandlerContext ctx,
boolean serverSide,
ConcurrentHashMap<String,UserProcessor<?>> userProcessors)
Constructor.
|
RemotingContext(io.netty.channel.ChannelHandlerContext ctx,
InvokeContext invokeContext,
boolean serverSide,
ConcurrentHashMap<String,UserProcessor<?>> userProcessors)
Constructor.
|
| 限定符和类型 | 方法和说明 |
|---|---|
long |
getArriveTimestamp()
Getter method for property arriveTimestamp.
|
io.netty.channel.ChannelHandlerContext |
getChannelContext()
Get the channel handler context.
|
Connection |
getConnection()
Get connection from channel
|
InvokeContext |
getInvokeContext()
Getter method for property invokeContext.
|
int |
getTimeout()
Getter method for property timeout.
|
UserProcessor<?> |
getUserProcessor(String className)
Get user processor for class name.
|
boolean |
isRequestTimeout()
whether this request already timeout
|
boolean |
isServerSide()
The server side
|
boolean |
isTimeoutDiscard() |
void |
setArriveTimestamp(long arriveTimestamp)
Setter method for property arriveTimestamp.
|
void |
setChannelContext(io.netty.channel.ChannelHandlerContext ctx)
Set the channel handler context.
|
void |
setRpcCommandType(int rpcCommandType)
Setter method for property rpcCommandType.
|
void |
setTimeout(int timeout)
Setter method for property timeout.
|
RemotingContext |
setTimeoutDiscard(boolean failFastEnabled) |
io.netty.channel.ChannelFuture |
writeAndFlush(RemotingCommand msg)
Wrap the writeAndFlush method.
|
public RemotingContext(io.netty.channel.ChannelHandlerContext ctx)
ctx - public RemotingContext(io.netty.channel.ChannelHandlerContext ctx,
boolean serverSide)
ctx - serverSide - public RemotingContext(io.netty.channel.ChannelHandlerContext ctx,
boolean serverSide,
ConcurrentHashMap<String,UserProcessor<?>> userProcessors)
ctx - serverSide - userProcessors - public RemotingContext(io.netty.channel.ChannelHandlerContext ctx,
InvokeContext invokeContext,
boolean serverSide,
ConcurrentHashMap<String,UserProcessor<?>> userProcessors)
ctx - invokeContext - serverSide - userProcessors - public io.netty.channel.ChannelFuture writeAndFlush(RemotingCommand msg)
msg - public boolean isRequestTimeout()
public boolean isServerSide()
public UserProcessor<?> getUserProcessor(String className)
className - public Connection getConnection()
public io.netty.channel.ChannelHandlerContext getChannelContext()
public void setChannelContext(io.netty.channel.ChannelHandlerContext ctx)
ctx - public InvokeContext getInvokeContext()
public void setArriveTimestamp(long arriveTimestamp)
arriveTimestamp - value to be assigned to property arriveTimestamppublic long getArriveTimestamp()
public void setTimeout(int timeout)
timeout - value to be assigned to property timeoutpublic int getTimeout()
public void setRpcCommandType(int rpcCommandType)
rpcCommandType - value to be assigned to property rpcCommandTypepublic boolean isTimeoutDiscard()
public RemotingContext setTimeoutDiscard(boolean failFastEnabled)
Copyright © 2021. All rights reserved.