public Void run() { channel.disconnect(); channel.close(); return null; } });
public void actionPerformed(ActionEvent e) { channel.disconnect(); channel.close(); System.exit(0); } });
public void destroy() { System.out.println("------- DESTROY"); if(receiver != null && receiver.isAlive()) { fl=false; receiver.interrupt(); try {receiver.join(1000);} catch(Exception ex) {} } receiver=null; showStatus("Disconnecting from " + groupname); channel.disconnect(); showStatus("Disconnected"); }
public void disconnect() { if (channel != null && channel.isOpen()) { if (log.isInfoEnabled()) log.info("Disconnecting and closing the Channel"); channel.disconnect(); channel.close(); } }
public void stop() throws Exception { this.service.stop(); log.info( "Disconnect from " + clusterName ); channelRef.getValue().disconnect(); }
private synchronized void handleLeave() { try { System.out.print("Stopping PullPushAdapter"); ad.stop(); System.out.println(" -- done"); System.out.print("Disconnecting the channel"); channel.disconnect(); System.out.println(" -- done"); System.out.print("Closing the channel"); channel.close(); System.out.println(" -- done"); System.exit(0); } catch(Exception e) { e.printStackTrace(); ta.append("Failed leaving the group: " + e.toString() + '\n'); } }
public void run() { listAlphabet(); channel.disconnect(); channel.close(); } }
void disconnect() { if (logmon.isLoggable(BasicLevel.DEBUG)) logmon.log(BasicLevel.DEBUG, "disconnect()"); if (channel != null) { channel.disconnect(); channel = null; } }
public void actionPerformed(ActionEvent e) { String command=e.getActionCommand(); if("Gossip".equals(command)) { sendGossip(); } else if("Clear".equals(command)) sendClearPanelMsg(); else if("Leave & Exit".equals(command)) { try { channel.disconnect(); channel.close(); } catch(Exception ex) { System.err.println(ex); } mainFrame.setVisible(false); System.exit(0); } else System.out.println("Unknown action"); }
/** * {@inheritDoc} * @see net.sf.hajdbc.Lifecycle#stop() */ @Override public void stop() { Channel channel = this.dispatcher.getChannel(); if (channel.isOpen()) { if (channel.isConnected()) { channel.disconnect(); } } }
this.channel.disconnect(); this.channel.close();
/** * Shuts down and clears resources held by this service. * * @return {@code true} if the service has been shutdown or {@code false} if it had already been shut down. */ public synchronized boolean shutdown() { if (channel == null) { return false; } Address address = channel.getAddress(); LOGGER.debug("{0} shutting down clustering service...", address); consumers.clear(); // Mark this as not accepting any more ... isOpen.set(false); try { // Disconnect from the channel and close it ... channel.disconnect(); channel.removeChannelListener(listener); channel.setReceiver(null); channel.close(); LOGGER.debug("{0} successfully closed main channel", address); } finally { channel = null; } membersInCluster.set(1); return true; }
/** * Shuts down and clears resources held by this service. * * @return {@code true} if the service has been shutdown or {@code false} if it had already been shut down. */ public synchronized boolean shutdown() { if (channel == null) { return false; } Address address = channel.getAddress(); LOGGER.debug("{0} shutting down clustering service...", address); consumers.clear(); // Mark this as not accepting any more ... isOpen.set(false); try { // Disconnect from the channel and close it ... channel.disconnect(); channel.removeChannelListener(listener); channel.setReceiver(null); channel.close(); LOGGER.debug("{0} successfully closed main channel", address); } finally { channel = null; } membersInCluster.set(1); return true; }
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(); } } } }