protected void shutdownExternal() throws Exception { try { if (adapter != null) { adapter.stop(); } channel.close(); } finally { adapter = null; channel = null; } }
protected void shutdownExternal() throws Exception { try { if (adapter != null) { adapter.stop(); } channel.close(); } finally { adapter = null; channel = null; } }
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 stop() { if(request_handler != null && request_handler.isAlive()) { request_queue.close(true); request_handler=null; } request_handler=null; if(channel != null) { channel.close(); } if(adapter != null) { adapter.stop(); adapter=null; } channel=null; }