public RequestCorrelator(Protocol transport, RequestHandler handler, Address local_addr) { this.transport = transport; this.local_addr = local_addr; request_handler = handler; start(); }
public void setRequestHandler(RequestHandler handler) { request_handler=handler; start(); }
/** * Constructor. Uses transport to send messages. If {@code handler} is not null, all incoming requests will be * dispatched to it (via {@code handle(Message)}). * * @param corr_id Used to differentiate between different RequestCorrelators (e.g. in different protocol layers). * Has to be unique if multiple request correlators are used. * * @param transport Used to send/pass up requests. * * @param handler Request handler. Method {@code handle(Message)} will be called when a request is received. */ public RequestCorrelator(short corr_id, Protocol transport, RequestHandler handler, Address local_addr) { this.corr_id=corr_id; this.transport = transport; this.local_addr = local_addr; request_handler = handler; start(); }
public <X extends MessageDispatcher> X start() { if(corr == null) corr=createRequestCorrelator(prot_adapter, this, local_addr) .asyncDispatching(async_dispatching).wrapExceptions(this.wrap_exceptions); correlatorStarted(); corr.start(); if(channel != null) { List<Address> tmp_mbrs=channel.getView() != null ? channel.getView().getMembers() : null; setMembers(tmp_mbrs); if(channel instanceof JChannel) { TP transport=channel.getProtocolStack().getTransport(); corr.registerProbeHandler(transport); } } return (X)this; }
public RequestCorrelator(String name, Object transport, RequestHandler handler, Address local_addr) { this.name = name; this.transport = transport; this.local_addr=local_addr; request_handler = handler; start(); }
public RequestCorrelator(String name, Object transport, RequestHandler handler, boolean deadlock_detection, Address local_addr, boolean concurrent_processing) { this.deadlock_detection = deadlock_detection; this.name = name; this.transport = transport; this.local_addr = local_addr; request_handler = handler; this.concurrent_processing = concurrent_processing; start(); }
public RequestCorrelator(Protocol transport, RequestHandler handler, Address local_addr) { this.transport = transport; this.local_addr = local_addr; request_handler = handler; start(); }
public RequestCorrelator(String name, Object transport, RequestHandler handler, boolean deadlock_detection, boolean concurrent_processing) { this.deadlock_detection = deadlock_detection; this.name = name; this.transport = transport; request_handler = handler; this.concurrent_processing = concurrent_processing; start(); }
public RequestCorrelator(String name, Object transport, RequestHandler handler, boolean deadlock_detection, Address local_addr) { this.deadlock_detection = deadlock_detection; this.name = name; this.transport = transport; this.local_addr = local_addr; request_handler = handler; start(); }
public void setRequestHandler(RequestHandler handler) { request_handler=handler; start(); }
public void setRequestHandler(RequestHandler handler) { request_handler=handler; start(); }
/** * Constructor. Uses transport to send messages. If <code>handler</code> * is not null, all incoming requests will be dispatched to it (via * <code>handle(Message)</code>). * * @param name Used to differentiate between different RequestCorrelators * (e.g. in different protocol layers). Has to be unique if multiple * request correlators are used. * * @param transport Used to send/pass up requests. Can be either a Transport (only send() will be * used then), or a Protocol (up_prot.up()/down_prot.down() will be used) * * @param handler Request handler. Method <code>handle(Message)</code> * will be called when a request is received. */ public RequestCorrelator(String name, Object transport, RequestHandler handler) { this.name = name; this.transport = transport; request_handler = handler; start(); }
/** * Constructor. Uses transport to send messages. If {@code handler} is not null, all incoming requests will be * dispatched to it (via {@code handle(Message)}). * * @param corr_id Used to differentiate between different RequestCorrelators (e.g. in different protocol layers). * Has to be unique if multiple request correlators are used. * * @param transport Used to send/pass up requests. * * @param handler Request handler. Method {@code handle(Message)} will be called when a request is received. */ public RequestCorrelator(short corr_id, Protocol transport, RequestHandler handler, Address local_addr) { this.corr_id=corr_id; this.transport = transport; this.local_addr = local_addr; request_handler = handler; start(); }
/** * Constructor. Uses transport to send messages. If <code>handler</code> * is not null, all incoming requests will be dispatched to it (via * <code>handle(Message)</code>). * * @param name Used to differentiate between different RequestCorrelators * (e.g. in different protocol layers). Has to be unique if multiple * request correlators are used. * * @param transport Used to send/pass up requests. Can be either a Transport (only send() will be * used then), or a Protocol (up_prot.up()/down_prot.down() will be used) * * @param handler Request handler. Method <code>handle(Message)</code> * will be called when a request is received. * * @param deadlock_detection When enabled (true) recursive synchronous * message calls will be detected and processed with higher priority in * order to solve deadlocks. Slows down processing a little bit when * enabled due to runtime checks involved. */ public RequestCorrelator(String name, Object transport, RequestHandler handler, boolean deadlock_detection) { this.deadlock_detection = deadlock_detection; this.name = name; this.transport = transport; request_handler = handler; start(); }
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); } }
public <X extends MessageDispatcher> X start() { if(corr == null) corr=createRequestCorrelator(prot_adapter, this, local_addr) .asyncDispatching(async_dispatching).wrapExceptions(this.wrap_exceptions); correlatorStarted(); corr.start(); if(channel != null) { List<Address> tmp_mbrs=channel.getView() != null ? channel.getView().getMembers() : null; setMembers(tmp_mbrs); if(channel instanceof JChannel) { TP transport=channel.getProtocolStack().getTransport(); corr.registerProbeHandler(transport); } } return (X)this; }