/** * Handle the event ClientConnectionCloseNotificationEvent * * @param event */ public void handleClientConnectionCloseNotificationEvent( ClientConnectionCloseNotificationEvent event) { try { if (!wsCommunicationsCloudClientManager .getCommunicationsCloudClientConnection(networkServiceType) .isRegister()) { this.register = Boolean.FALSE; if (communicationNetworkServiceConnectionManager != null) { communicationNetworkServiceConnectionManager.closeAllConnection(); communicationNetworkServiceConnectionManager.stop(); } communicationSupervisorPendingMessagesAgent.removeAllConnectionWaitingForResponse(); onClientConnectionClose(); } } catch (Exception e) { e.printStackTrace(); } }
/** * Handle the event ClientConnectionLooseNotificationEvent * * @param event */ public void handleClientConnectionLooseNotificationEvent( ClientConnectionLooseNotificationEvent event) { try { if (!wsCommunicationsCloudClientManager .getCommunicationsCloudClientConnection(networkServiceType) .isRegister()) { if (communicationNetworkServiceConnectionManager != null) { communicationNetworkServiceConnectionManager.stop(); } this.register = Boolean.FALSE; reprocessMessages(); onClientConnectionLoose(); } } catch (Exception e) { e.printStackTrace(); } }