Class NetworkContext
java.lang.Object
com.levigo.jadice.web.transport.server.NetworkContext
Deprecated.
use TransportManagerProvider instead
A
NetworkContext that provides the possibility to register
NetworkContext.NetworkInitializedListeners and ClientSessionListeners.
As the network layer gets initialized after the server application is built, this class provides
a NetworkContext.NetworkInitializedListener to get informed on the initialization of the network layer.
Use isInitialized() to check if the network layer is initialized and get() in
order to obtain the instance.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceDeprecated.A listener that gets informed if the network layer was initialized. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidDeprecated.Registers aClientSessionListener.static voidaddNetworkInitializedListener(NetworkContext.NetworkInitializedListener initializedListener) Deprecated.Registers anNetworkContext.NetworkInitializedListener.static NetworkContextget()Deprecated.This returns theNetworkContext.Deprecated.Returns a list of all clients known by this server.static booleanDeprecated.Checks if theNetworkContextwas initialized.abstract voidDeprecated.Removes a previous registeredClientSessionListener.static voidremoveNetworkInitializedListener(NetworkContext.NetworkInitializedListener initializedListener) Deprecated.Removes anNetworkContext.NetworkInitializedListener.protected static voidset(NetworkContext connectionContext) Deprecated.This is an automatic setter used by thecom.levigo.jadice.web.transport.server.TransportWebtoolkitFilterin order to set theNetworkContextand inform allNetworkContext.NetworkInitializedListeners that are registered.
-
Constructor Details
-
NetworkContext
public NetworkContext()Deprecated.
-
-
Method Details
-
addClientSessionListener
Deprecated.Registers aClientSessionListener. The listener gets informed on events of client sessions.- Parameters:
listener- the listener to register
-
removeClientSessionListener
Deprecated.Removes a previous registeredClientSessionListener.- Parameters:
listener- the listener to remove
-
getClients
Deprecated.Returns a list of all clients known by this server.- Returns:
- the list of
Clients
-
get
Deprecated.This returns theNetworkContext. TheNetworkContextgets initialized by thecom.levigo.jadice.web.transport.server.TransportWebtoolkitFilterand supplemented with further details by other components once they are initialized.Calling this method prior to the initialization this will return
null.- Returns:
- the
NetworkContext, ornullif none was initialize yet
-
set
Deprecated.This is an automatic setter used by thecom.levigo.jadice.web.transport.server.TransportWebtoolkitFilterin order to set theNetworkContextand inform allNetworkContext.NetworkInitializedListeners that are registered.- Parameters:
connectionContext- that was established
-
addNetworkInitializedListener
public static void addNetworkInitializedListener(NetworkContext.NetworkInitializedListener initializedListener) Deprecated.Registers anNetworkContext.NetworkInitializedListener.- Parameters:
initializedListener- the listener that gets informed on the session layer initializion
-
removeNetworkInitializedListener
public static void removeNetworkInitializedListener(NetworkContext.NetworkInitializedListener initializedListener) Deprecated.Removes anNetworkContext.NetworkInitializedListener.- Parameters:
initializedListener- the listener that should be removed
-
isInitialized
public static boolean isInitialized()Deprecated.Checks if theNetworkContextwas initialized. If this yieldstrue,get()can be called to obtain the currentNetworkContextinstance.- Returns:
trueif theNetworkContextwas initialized,falseif not
-