protected static RequestCorrelator createRequestCorrelator(Protocol transport, RequestHandler handler, Address local_addr) { return new RequestCorrelator(transport, handler, local_addr); }
@SuppressWarnings("resource") public ChannelCommandDispatcherFactory(ChannelCommandDispatcherFactoryConfiguration config) { this.marshallingContext = config.getMarshallingContext(); this.timeout = config.getTimeout(); JChannel channel = config.getChannel(); RequestCorrelator correlator = new RequestCorrelator(channel.getProtocolStack(), this, channel.getAddress()).setMarshaller(new CommandResponseMarshaller(config)); this.dispatcher = new MessageDispatcher() .setChannel(channel) .setRequestHandler(this) .setMembershipListener(this) .asyncDispatching(true) // Setting the request correlator starts the dispatcher .correlator(correlator) ; this.view.compareAndSet(null, channel.getView()); }
protected static RequestCorrelator createRequestCorrelator(Protocol transport, RequestHandler handler, Address local_addr) { return new RequestCorrelator(transport, handler, local_addr); }
public final void start() { if(corr == null) { if(transport_adapter != null) { corr=new RequestCorrelator("MessageDispatcher", transport_adapter, this, deadlock_detection, local_addr, concurrent_processing); } else { corr=new RequestCorrelator("MessageDispatcher", prot_adapter, this, deadlock_detection, local_addr, concurrent_processing); } } correlatorStarted(); corr.start(); if(channel != null) { Vector tmp_mbrs=channel.getView() != null ? channel.getView().getMembers() : null; setMembers(tmp_mbrs); } }
@SuppressWarnings("resource") public ChannelCommandDispatcherFactory(ChannelCommandDispatcherFactoryConfiguration config) { this.marshallingContext = config.getMarshallingContext(); this.timeout = config.getTimeout(); JChannel channel = config.getChannel(); RequestCorrelator correlator = new RequestCorrelator(channel.getProtocolStack(), this, channel.getAddress()).setMarshaller(new CommandResponseMarshaller(config)); this.dispatcher = new MessageDispatcher() .setChannel(channel) .setRequestHandler(this) .setMembershipListener(this) .asyncDispatching(true) // Setting the request correlator starts the dispatcher .correlator(correlator) ; this.view.compareAndSet(null, channel.getView()); }