public class RpcCommandFactory extends Object implements CommandFactory
| Constructor and Description |
|---|
RpcCommandFactory() |
| Modifier and Type | Method and Description |
|---|---|
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 in interface CommandFactoryrequestObject - the request object included in request commandpublic RpcResponseCommand createResponse(Object responseObject, RemotingCommand requestCmd)
CommandFactorycreateResponse in interface CommandFactorypublic RpcResponseCommand createExceptionResponse(int id, String errMsg)
createExceptionResponse in interface CommandFactorypublic RpcResponseCommand createExceptionResponse(int id, Throwable t, String errMsg)
createExceptionResponse in interface CommandFactorypublic RpcResponseCommand createExceptionResponse(int id, ResponseStatus status)
createExceptionResponse in interface CommandFactorypublic RpcResponseCommand createExceptionResponse(int id, ResponseStatus status, Throwable t)
createExceptionResponse in interface CommandFactorypublic ResponseCommand createTimeoutResponse(InetSocketAddress address)
createTimeoutResponse in interface CommandFactorypublic RemotingCommand createSendFailedResponse(InetSocketAddress address, Throwable throwable)
createSendFailedResponse in interface CommandFactorypublic RemotingCommand createConnectionClosedResponse(InetSocketAddress address, String message)
createConnectionClosedResponse in interface CommandFactoryCopyright © 2024. All rights reserved.