this.timeout = config.getTimeout();
final RpcDispatcher.Marshaller marshaller = new CommandResponseMarshaller(this.marshallingContext);
this.dispatcher = new MessageDispatcher() {
@Override
protected RequestCorrelator createRequestCorrelator(Protocol transport, RequestHandler handler, Address localAddr) {
RequestCorrelator correlator = super.createRequestCorrelator(transport, handler, localAddr);
correlator.setMarshaller(marshaller);
return correlator;
}
};
this.dispatcher.setChannel(config.getChannel());
this.dispatcher.setRequestHandler(this);