com.alipay.remoting.rpc
Class RpcCommandFactory
java.lang.Object
com.alipay.remoting.rpc.RpcCommandFactory
- All Implemented Interfaces:
- CommandFactory
public class RpcCommandFactory
- extends Object
- implements CommandFactory
command factory for rpc protocol
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RpcCommandFactory
public RpcCommandFactory()
createRequestCommand
public RpcRequestCommand createRequestCommand(Object requestObject)
- Description copied from interface:
CommandFactory
- create a request command with request object
- Specified by:
createRequestCommand in interface CommandFactory
- Parameters:
requestObject - the request object included in request command
- Returns:
createResponse
public RpcResponseCommand createResponse(Object responseObject,
RemotingCommand requestCmd)
- Description copied from interface:
CommandFactory
- create a normal response with response object
- Specified by:
createResponse in interface CommandFactory
- Returns:
createExceptionResponse
public RpcResponseCommand createExceptionResponse(int id,
String errMsg)
- Specified by:
createExceptionResponse in interface CommandFactory
createExceptionResponse
public RpcResponseCommand createExceptionResponse(int id,
Throwable t,
String errMsg)
- Specified by:
createExceptionResponse in interface CommandFactory
createExceptionResponse
public RpcResponseCommand createExceptionResponse(int id,
ResponseStatus status)
- Specified by:
createExceptionResponse in interface CommandFactory
createTimeoutResponse
public ResponseCommand createTimeoutResponse(InetSocketAddress address)
- Specified by:
createTimeoutResponse in interface CommandFactory
createSendFailedResponse
public RemotingCommand createSendFailedResponse(InetSocketAddress address,
Throwable throwable)
- Specified by:
createSendFailedResponse in interface CommandFactory
createConnectionClosedResponse
public RemotingCommand createConnectionClosedResponse(InetSocketAddress address,
String message)
- Specified by:
createConnectionClosedResponse in interface CommandFactory
Copyright © 2018. All rights reserved.