public NetworkHealthCheck(String nicName, long checkPeriod, int networkTimeout) { super(null, null, checkPeriod, TimeUnit.MILLISECONDS, false); this.networkTimeout = networkTimeout; this.setNICName(nicName); }
@Override public NetworkHealthCheck setTimeUnit(TimeUnit timeUnit) { super.setTimeUnit(timeUnit); return this; }
public SessionQueueQueryResponseMessage_V3(final QueueQueryResult result) { this(result.getName(), result.getAddress(), result.isDurable(), result.isTemporary(), result.getFilterString(), result.getConsumerCount(), result.getMessageCount(), result.isExists(), result.isAutoCreateQueues(), result.isAutoCreated(), result.isPurgeOnNoConsumers(), result.getRoutingType(), result.getMaxConsumers(), result.isExclusive(), result.isLastValue()); }
public SessionQueueQueryResponseMessage_V2(final QueueQueryResult result) { this(result.getName(), result.getAddress(), result.isDurable(), result.isTemporary(), result.getFilterString(), result.getConsumerCount(), result.getMessageCount(), result.isExists(), result.isAutoCreateQueues()); }
/** * @return true if no checks were done or if one address/url responds; false if all addresses/urls fail */ public boolean check() { if (isEmpty()) { return true; } for (InetAddress address : addresses) { if (check(address)) { return true; } } for (URL url : urls) { if (check(url)) { return true; } } return false; }
public synchronized ActiveMQScheduledComponent setPeriod(long period, TimeUnit unit) { this.period = period; this.timeUnit = unit; restartIfNeeded(); return this; }
@Override public void stop() { scheduledComponent.stop(); }
@Override public void start() { scheduledComponent.start(); }
@Override public NetworkHealthCheck setPeriod(long period) { super.setPeriod(period); return this; }
@Override public boolean isStarted() { return scheduledComponent.isStarted(); } }
public NetworkHealthCheck addComponent(ActiveMQComponent component) { componentList.add(component); checkStart(); return this; }
public SessionQueueQueryResponseMessage(final QueueQueryResult result) { this(result.getName(), result.getAddress(), result.isDurable(), result.isTemporary(), result.getFilterString(), result.getConsumerCount(), result.getMessageCount(), result.isExists()); }
public synchronized ActiveMQScheduledComponent setTimeUnit(TimeUnit timeUnit) { this.timeUnit = timeUnit; restartIfNeeded(); return this; }
@Override public CriticalAnalyzer setCheckTime(long timeout, TimeUnit unit) { this.checkTimeNanoSeconds = unit.toNanos(timeout); this.scheduledComponent.setPeriod(timeout, unit); return this; }
/** * Useful to change a running schedule and avoid multiple restarts. */ public synchronized ActiveMQScheduledComponent setInitialDelayAndPeriod(long initialDelay, long period, TimeUnit timeUnit) { this.period = period; this.initialDelay = initialDelay; this.timeUnit = timeUnit; restartIfNeeded(); return this; }
public synchronized ActiveMQScheduledComponent setPeriod(long period) { this.period = period; restartIfNeeded(); return this; }
public synchronized ActiveMQScheduledComponent setInitialDelay(long initialDelay) { this.initialDelay = initialDelay; restartIfNeeded(); return this; }
/** * Useful to change a running schedule and avoid multiple restarts. */ public synchronized ActiveMQScheduledComponent setInitialDelayAndPeriod(long initialDelay, long period) { this.period = period; this.initialDelay = initialDelay; restartIfNeeded(); return this; }