Package org.eclipse.net4j.signal
Klasse SignalProtocol<INFRA_STRUCTURE>
java.lang.Object
org.eclipse.net4j.util.event.Notifier
org.eclipse.net4j.util.lifecycle.Lifecycle
org.eclipse.spi.net4j.Protocol<INFRA_STRUCTURE>
org.eclipse.net4j.signal.SignalProtocol<INFRA_STRUCTURE>
- Alle implementierten Schnittstellen:
IBufferHandler
,ILocationAware
,IProtocol<INFRA_STRUCTURE>
,IProtocol2<INFRA_STRUCTURE>
,IProtocol3<INFRA_STRUCTURE>
,ISignalProtocol<INFRA_STRUCTURE>
,ISignalProtocol.WithSignalCounters<INFRA_STRUCTURE>
,org.eclipse.net4j.util.collection.Entity.Store.Provider
,org.eclipse.net4j.util.concurrent.IExecutorServiceProvider
,org.eclipse.net4j.util.container.IManagedContainerProvider
,org.eclipse.net4j.util.event.INotifier
,org.eclipse.net4j.util.event.INotifier.INotifier2
,org.eclipse.net4j.util.lifecycle.IDeactivateable
,org.eclipse.net4j.util.lifecycle.ILifecycle
,org.eclipse.net4j.util.lifecycle.ILifecycle.DeferrableActivation
,org.eclipse.net4j.util.security.IUserAware
- Bekannte direkte Unterklassen:
AuthenticatingSignalProtocol
,HeartBeatProtocol
,HeartBeatProtocol.Server
public class SignalProtocol<INFRA_STRUCTURE>
extends Protocol<INFRA_STRUCTURE>
implements ISignalProtocol.WithSignalCounters<INFRA_STRUCTURE>, org.eclipse.net4j.util.collection.Entity.Store.Provider
The default implementation of a
signal protocol
.
On the receiver side(s)
of protocol the
createSignalReactor()
method has to be overridden to
create appropriate peer instances for incoming signals
.
- Autor:
- Eike Stepper
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypKlasseBeschreibungstatic final class
static final class
Von Klasse geerbte verschachtelte Klassen/Schnittstellen org.eclipse.spi.net4j.Protocol
Protocol.InfraStructureChangedEvent
Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen org.eclipse.net4j.util.lifecycle.ILifecycle
org.eclipse.net4j.util.lifecycle.ILifecycle.DeferrableActivation
Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen org.eclipse.net4j.ILocationAware
ILocationAware.Location
Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen org.eclipse.net4j.util.event.INotifier
org.eclipse.net4j.util.event.INotifier.INotifier2
Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen org.eclipse.net4j.signal.ISignalProtocol
ISignalProtocol.WithSignalCounters<INFRA_STRUCTURE>
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungstatic final long
static final short
static final short
static final short
static final short
static final short
static final short
Von Klasse geerbte Felder org.eclipse.net4j.util.lifecycle.Lifecycle
USE_LABEL
Von Schnittstelle geerbte Felder org.eclipse.net4j.protocol.IProtocol2
UNSPECIFIED_VERSION
Von Schnittstelle geerbte Felder org.eclipse.net4j.signal.ISignalProtocol
DEFAULT_TIMEOUT, NO_TIMEOUT
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
addStreamWrapper
(org.eclipse.net4j.util.io.IStreamWrapper streamWrapper) void
close()
protected SignalReactor
createSignalReactor
(short signalID) Returns a new signal instance to serve the given signal ID ornull
if the signal ID is invalid/unknown for this protocol.protected void
protected void
org.eclipse.net4j.util.collection.Entity.Store
long
long
org.eclipse.net4j.util.io.IStreamWrapper
protected org.eclipse.net4j.util.io.StringCompressor
long
void
handleBuffer
(IBuffer buffer) Handles a given (incoming) buffer.protected void
protected boolean
Returnstrue
by default, override to change this behavior.open
(IConnector connector) protected final SignalReactor
provideSignalReactor
(short signalID) void
setStreamWrapper
(org.eclipse.net4j.util.io.IStreamWrapper streamWrapper) void
setTimeout
(long timeout) Equivalent to calling SignalProtocol.setTimeout(timeout, false).boolean
setTimeout
(long timeout, boolean useOldTimeoutToSendNewOne) Update the timeout used for signal end of stream waiting time.toString()
boolean
waitForSignals
(long timeout) Von Klasse geerbte Methoden org.eclipse.spi.net4j.Protocol
doBeforeActivate, getBufferProvider, getChannel, getContainer, getExecutorService, getInfraStructure, getLocation, getType, getUserID, getVersion, isClient, isServer, setChannel, setExecutorService, setInfraStructure, setUserID
Von Klasse geerbte Methoden org.eclipse.net4j.util.lifecycle.Lifecycle
activate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doActivate, doAfterActivate, dump, getLifecycleState, isActive, isDeferredActivation
Von Klasse geerbte Methoden org.eclipse.net4j.util.event.Notifier
addListener, addUniqueListener, fireEvent, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListener, hasListeners, lastListenerRemoved, listenerAdded, listenerRemoved, removeListener
Von Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden org.eclipse.net4j.ILocationAware
getLocation, isClient, isServer
Von Schnittstelle geerbte Methoden org.eclipse.net4j.util.event.INotifier
addListener, getListeners, hasListeners, removeListener
Von Schnittstelle geerbte Methoden org.eclipse.net4j.protocol.IProtocol
getBufferProvider, getChannel, getExecutorService, getInfraStructure, getType, setChannel, setExecutorService, setInfraStructure
Von Schnittstelle geerbte Methoden org.eclipse.net4j.protocol.IProtocol3
doWhenFullyConnected
Von Schnittstelle geerbte Methoden org.eclipse.net4j.util.security.IUserAware
getUserID
-
Felddetails
-
COMPRESSED_STRINGS_ACKNOWLEDGE_TIMEOUT
public static final long COMPRESSED_STRINGS_ACKNOWLEDGE_TIMEOUT- Seit:
- 4.7
-
SIGNAL_REMOTE_EXCEPTION
public static final short SIGNAL_REMOTE_EXCEPTION- Seit:
- 2.0
- Siehe auch:
-
SIGNAL_MONITOR_CANCELED
public static final short SIGNAL_MONITOR_CANCELED- Seit:
- 2.0
- Siehe auch:
-
SIGNAL_MONITOR_PROGRESS
public static final short SIGNAL_MONITOR_PROGRESS- Seit:
- 2.0
- Siehe auch:
-
SIGNAL_SET_TIMEOUT
public static final short SIGNAL_SET_TIMEOUT- Seit:
- 4.1
- Siehe auch:
-
SIGNAL_ACKNOWLEDGE_COMPRESSED_STRINGS
public static final short SIGNAL_ACKNOWLEDGE_COMPRESSED_STRINGS- Seit:
- 4.7
- Siehe auch:
-
SIGNAL_ENTITY
public static final short SIGNAL_ENTITY- Seit:
- 4.20
- Siehe auch:
-
-
Konstruktordetails
-
SignalProtocol
- Seit:
- 2.0
-
-
Methodendetails
-
getTimeout
public long getTimeout()- Angegeben von:
getTimeout
in SchnittstelleISignalProtocol<INFRA_STRUCTURE>
- Seit:
- 2.0
-
setTimeout
public void setTimeout(long timeout) Equivalent to calling SignalProtocol.setTimeout(timeout, false).- Angegeben von:
setTimeout
in SchnittstelleISignalProtocol<INFRA_STRUCTURE>
- Seit:
- 2.0
-
setTimeout
public boolean setTimeout(long timeout, boolean useOldTimeoutToSendNewOne) Update the timeout used for signal end of stream waiting time.- Parameter:
timeout
- the new timeoutuseOldTimeoutToSendNewOne
-true
to use the old timeout,false
to use the new specified one to sent to server side the new specified timeout- Gibt zurück:
true
if the new specified timeout has correctly been sent NOTE: this second parameter is useful mostly for test to be able to set a to small timeout- Seit:
- 4.4
-
getStreamWrapper
public org.eclipse.net4j.util.io.IStreamWrapper getStreamWrapper()- Angegeben von:
getStreamWrapper
in SchnittstelleISignalProtocol<INFRA_STRUCTURE>
-
setStreamWrapper
public void setStreamWrapper(org.eclipse.net4j.util.io.IStreamWrapper streamWrapper) - Angegeben von:
setStreamWrapper
in SchnittstelleISignalProtocol<INFRA_STRUCTURE>
-
addStreamWrapper
public void addStreamWrapper(org.eclipse.net4j.util.io.IStreamWrapper streamWrapper) - Angegeben von:
addStreamWrapper
in SchnittstelleISignalProtocol<INFRA_STRUCTURE>
-
getEntityStore
public org.eclipse.net4j.util.collection.Entity.Store getEntityStore()- Angegeben von:
getEntityStore
in Schnittstelleorg.eclipse.net4j.util.collection.Entity.Store.Provider
-
getSentSignals
public long getSentSignals()- Angegeben von:
getSentSignals
in SchnittstelleISignalProtocol.WithSignalCounters<INFRA_STRUCTURE>
- Seit:
- 4.13
-
getReceivedSignals
public long getReceivedSignals()- Angegeben von:
getReceivedSignals
in SchnittstelleISignalProtocol.WithSignalCounters<INFRA_STRUCTURE>
-
open
- Angegeben von:
open
in SchnittstelleISignalProtocol<INFRA_STRUCTURE>
- Seit:
- 2.0
-
close
public void close()- Angegeben von:
close
in SchnittstelleISignalProtocol<INFRA_STRUCTURE>
- Seit:
- 2.0
-
waitForSignals
public boolean waitForSignals(long timeout) -
handleBuffer
Handles a given (incoming) buffer. Creates a signal to act upon the given buffer or uses a previously created signal.- Angegeben von:
handleBuffer
in SchnittstelleIBufferHandler
- Parameter:
buffer
- The buffer to be handled.
-
toString
- Setzt außer Kraft:
toString
in Klasseorg.eclipse.net4j.util.lifecycle.Lifecycle
-
doBeforeDeactivate
- Setzt außer Kraft:
doBeforeDeactivate
in Klasseorg.eclipse.net4j.util.lifecycle.Lifecycle
- Löst aus:
Exception
-
doDeactivate
- Setzt außer Kraft:
doDeactivate
in KlasseProtocol<INFRA_STRUCTURE>
- Löst aus:
Exception
-
handleChannelDeactivation
protected void handleChannelDeactivation()- Setzt außer Kraft:
handleChannelDeactivation
in KlasseProtocol<INFRA_STRUCTURE>
-
provideSignalReactor
-
createSignalReactor
Returns a new signal instance to serve the given signal ID ornull
if the signal ID is invalid/unknown for this protocol. -
isSendingTimeoutChanges
protected boolean isSendingTimeoutChanges()Returnstrue
by default, override to change this behavior.- Seit:
- 4.1
-
getStringCompressor
protected org.eclipse.net4j.util.io.StringCompressor getStringCompressor()- Seit:
- 4.7
-