Exemple #1
0
 public void disconnect() {
   if (isConnected()) {
     connected = false;
     messageHandler.disconnect();
     messageHandler = null;
   }
 }
Exemple #2
0
 public void handleMessage(OutboundMessage message) {
   if (connected && messageHandler != null) {
     logger.debug("Sending " + message + " to " + this);
     messageHandler.handleMessage(message);
   } else {
     logger.warn(this + " not connected");
   }
 }