@Test public void testCheckHealth() { registrySessionIsExpired.set(true); registrySessionContext.checkHealth(); registrySessionIsExpired.set(false); }
public void checkHealth() { if (_isChecking.compareAndSet(false, true)) { try { boolean available = _addressContext.get().isAavailable() && !isExpired() && isAvailable(); if (!available) { connect(); } } catch (final Throwable e) { _logger.warn("WebSocketSession check health failed", e); } finally { _isChecking.set(false); } } }
WebSocketSessionContext { public void checkHealth() { if (_isChecking.compareAndSet(false, true)) { try { boolean available = _addressContext.get().isAavailable() && !isExpired() && isAvailable(); if (!available) { connect(); } } catch (final Throwable e) { _logger.warn("WebSocketSession check health failed", e); } finally { _isChecking.set(false); } } } }
WebSocketSessionContext { public void checkHealth() { if (_isChecking.compareAndSet(false, true)) { try { boolean available = _addressContext.get().isAavailable() && !isExpired() && isAvailable(); if (!available) { connect(); } } catch (final Throwable e) { _logger.warn("WebSocketSession check health failed", e); } finally { _isChecking.set(false); } } } WebSocketSessionContext(final ArtemisClientConfig config); }
WebSocketSessionContext { public void checkHealth() { if (_isChecking.compareAndSet(false, true)) { try { boolean available = _addressContext.get().isAavailable() && !isExpired() && isAvailable(); if (!available) { connect(); } } catch (final Throwable e) { _logger.warn("WebSocketSession check health failed", e); } finally { _isChecking.set(false); } } } WebSocketSessionContext(final ArtemisClientConfig config); void start(); static void disconnect(final WebSocketSession session); WebSocketSession get(); void checkHealth(); void markdown(); void shutdown(); }
WebSocketSessionContext { public void checkHealth() { if (_isChecking.compareAndSet(false, true)) { try { boolean available = _addressContext.get().isAavailable() && !isExpired() && isAvailable(); if (!available) { connect(); } } catch (final Throwable e) { _logger.warn("WebSocketSession check health failed", e); } finally { _isChecking.set(false); } } } WebSocketSessionContext(final ArtemisClientConfig config); void start(); static void disconnect(final WebSocketSession session); WebSocketSession get(); void checkHealth(); void markdown(); void shutdown();  }