public void channelDisconnected(JChannel channel) { stop(); }
public void channelClosed(JChannel channel) { stop(); }
@Override public void close() throws IOException {stop();}
@Override public void run() { this.executorService.shutdownNow(); try { this.executorService.awaitTermination(this.timeout.toMillis(), TimeUnit.MILLISECONDS); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } this.dispatcher.stop(); this.dispatcher.getChannel().setUpHandler(null); // Cleanup any stray listeners for (ExecutorService executor : this.listeners.values()) { PrivilegedAction<List<Runnable>> action = () -> executor.shutdownNow(); WildFlySecurityManager.doUnchecked(action); } this.listeners.clear(); }
public <X extends MessageDispatcher> X correlator(RequestCorrelator c) { if(c == null) return (X)this; stop(); this.corr=c; corr.asyncDispatching(this.async_dispatching).wrapExceptions(this.wrap_exceptions); start(); return (X)this; }
public void start() throws Exception { channel=new JChannel(props); disp=new MessageDispatcher(channel, this).setMembershipListener(this); channel.connect("MessageDispatcherSpeedTestGroup"); try { if(server) { System.out.println("-- Started as server. Press ctrl-c to kill"); while(true) { Util.sleep(10000); } } else { sendMessages(num); } } catch(Throwable t) { t.printStackTrace(System.err); } finally { channel.close(); disp.stop(); } }
public void channelDisconnected(JChannel channel) { stop(); }
public void channelClosed(JChannel channel) { stop(); }
@Override public void close() throws IOException {stop();}
@Override public void run() { this.executorService.shutdownNow(); try { this.executorService.awaitTermination(this.timeout.toMillis(), TimeUnit.MILLISECONDS); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } this.dispatcher.stop(); this.dispatcher.getChannel().setUpHandler(null); // Cleanup any stray listeners for (ExecutorService executor : this.listeners.values()) { PrivilegedAction<List<Runnable>> action = () -> executor.shutdownNow(); WildFlySecurityManager.doUnchecked(action); } this.listeners.clear(); }
public void onEvent(RuntimeStop event) { dispatcher.stop(); domainChannel.disconnect(); domainChannel.close(); } }
public <X extends MessageDispatcher> X correlator(RequestCorrelator c) { if(c == null) return (X)this; stop(); this.corr=c; corr.asyncDispatching(this.async_dispatching).wrapExceptions(this.wrap_exceptions); start(); return (X)this; }
dispatcher.stop(); dispatcher = null;
public void onEvent(RuntimeStop event) { if (domainDispatcher != null) { domainDispatcher.stop(); } if (domainChannel != null && domainChannel.isConnected()) { domainChannel.disconnect(); domainChannel.close(); } for (Channel channel : channels.values()) { if (channel.isConnected()) { channel.disconnect(); channel.close(); } } } }
public void start() throws Exception { channel=new JChannel(props); disp=new MessageDispatcher(channel, this).setMembershipListener(this); channel.connect("MessageDispatcherSpeedTestGroup"); try { if(server) { System.out.println("-- Started as server. Press ctrl-c to kill"); while(true) { Util.sleep(10000); } } else { sendMessages(num); } } catch(Throwable t) { t.printStackTrace(System.err); } finally { channel.close(); disp.stop(); } }