public class RpcCommandFactory extends Object implements CommandFactory
| 构造器和说明 |
|---|
RpcCommandFactory() |
| 限定符和类型 | 方法和说明 |
|---|---|
RemotingCommand |
createConnectionClosedResponse(InetSocketAddress address,
String message) |
RpcResponseCommand |
createExceptionResponse(int id,
ResponseStatus status) |
RpcResponseCommand |
createExceptionResponse(int id,
ResponseStatus status,
Throwable t) |
RpcResponseCommand |
createExceptionResponse(int id,
String errMsg) |
RpcResponseCommand |
createExceptionResponse(int id,
Throwable t,
String errMsg) |
RpcRequestCommand |
createRequestCommand(Object requestObject)
create a request command with request object
|
RpcResponseCommand |
createResponse(Object responseObject,
RemotingCommand requestCmd)
create a normal response with response object
|
RemotingCommand |
createSendFailedResponse(InetSocketAddress address,
Throwable throwable) |
ResponseCommand |
createTimeoutResponse(InetSocketAddress address) |
public RpcRequestCommand createRequestCommand(Object requestObject)
CommandFactorycreateRequestCommand 在接口中 CommandFactoryrequestObject - the request object included in request commandpublic RpcResponseCommand createResponse(Object responseObject, RemotingCommand requestCmd)
CommandFactorycreateResponse 在接口中 CommandFactorypublic RpcResponseCommand createExceptionResponse(int id, String errMsg)
createExceptionResponse 在接口中 CommandFactorypublic RpcResponseCommand createExceptionResponse(int id, Throwable t, String errMsg)
createExceptionResponse 在接口中 CommandFactorypublic RpcResponseCommand createExceptionResponse(int id, ResponseStatus status)
createExceptionResponse 在接口中 CommandFactorypublic RpcResponseCommand createExceptionResponse(int id, ResponseStatus status, Throwable t)
createExceptionResponse 在接口中 CommandFactorypublic ResponseCommand createTimeoutResponse(InetSocketAddress address)
createTimeoutResponse 在接口中 CommandFactorypublic RemotingCommand createSendFailedResponse(InetSocketAddress address, Throwable throwable)
createSendFailedResponse 在接口中 CommandFactorypublic RemotingCommand createConnectionClosedResponse(InetSocketAddress address, String message)
createConnectionClosedResponse 在接口中 CommandFactoryCopyright © 2021. All rights reserved.