public class HeartBeatProtocol extends SignalProtocol<java.lang.Object>
signal protocol that keeps the connector of its channel open
or provides early deactivation feedback by exchanging periodic heart beats.| Modifier and Type | Class and Description |
|---|---|
static class |
HeartBeatProtocol.Server
The server-side implementation of a
heart beat protocol. |
SignalProtocol.TimeoutChangedEventILocationAware.LocationILifecycle.DeferrableActivation| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
TYPE |
COMPRESSED_STRINGS_ACKNOWLEDGE_TIMEOUT, SIGNAL_ACKNOWLEDGE_COMPRESSED_STRINGS, SIGNAL_MONITOR_CANCELED, SIGNAL_MONITOR_PROGRESS, SIGNAL_REMOTE_EXCEPTION, SIGNAL_SET_TIMEOUTDEFAULT_TIMEOUT, NO_TIMEOUTUNSPECIFIED_VERSION| Modifier | Constructor and Description |
|---|---|
|
HeartBeatProtocol(IConnector connector) |
|
HeartBeatProtocol(IConnector connector,
IManagedContainer container) |
|
HeartBeatProtocol(IConnector connector,
java.util.Timer timer) |
protected |
HeartBeatProtocol(java.lang.String type,
IConnector connector,
java.util.Timer timer) |
| Modifier and Type | Method and Description |
|---|---|
protected SignalReactor |
createSignalReactor(short signalID)
Returns a new signal instance to serve the given signal ID or
null if the signal ID is invalid/unknown
for this protocol. |
protected void |
doDeactivate() |
static java.util.Timer |
getDefaultTimer(IManagedContainer container) |
java.util.Timer |
getTimer() |
protected void |
handleTimeout(long untouched) |
protected void |
requestingStart(ExtendedDataOutputStream out,
long rate) |
void |
start(long rate)
Same as
start(rate, 2 * rate). |
void |
start(long rate,
long timeout) |
addStreamWrapper, close, doBeforeDeactivate, getStreamWrapper, getStringCompressor, getTimeout, handleBuffer, handleChannelDeactivation, isSendingTimeoutChanges, open, provideSignalReactor, setStreamWrapper, setTimeout, setTimeout, toString, waitForSignalsdoBeforeActivate, getBufferProvider, getChannel, getExecutorService, getInfraStructure, getLocation, getType, getUserID, getVersion, isClient, isServer, setChannel, setExecutorService, setInfraStructure, setUserIDactivate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doActivate, doAfterActivate, dump, getLifecycleState, isActive, isDeferredActivationaddListener, fireEvent, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListeners, lastListenerRemoved, removeListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetBufferProvider, getChannel, getExecutorService, getInfraStructure, getType, setChannel, setExecutorService, setInfraStructuregetUserIDgetLocation, isClient, isServeraddListener, getListeners, hasListeners, removeListenerpublic static final java.lang.String TYPE
protected HeartBeatProtocol(java.lang.String type,
IConnector connector,
java.util.Timer timer)
public HeartBeatProtocol(IConnector connector, java.util.Timer timer)
public HeartBeatProtocol(IConnector connector, IManagedContainer container)
public HeartBeatProtocol(IConnector connector)
public java.util.Timer getTimer()
public void start(long rate)
start(rate, 2 * rate).start(long, long)public void start(long rate,
long timeout)
protected SignalReactor createSignalReactor(short signalID)
SignalProtocolnull if the signal ID is invalid/unknown
for this protocol.createSignalReactor in class SignalProtocol<java.lang.Object>protected void handleTimeout(long untouched)
protected void doDeactivate()
throws java.lang.Exception
doDeactivate in class SignalProtocol<java.lang.Object>java.lang.Exceptionprotected void requestingStart(ExtendedDataOutputStream out, long rate) throws java.io.IOException
java.io.IOExceptionpublic static java.util.Timer getDefaultTimer(IManagedContainer container)
Copyright (c) 2004-2019 Eike Stepper (Loehne, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html