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.NetworkInitializedListener
s and ClientSessionListener
s.
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 interface
Deprecated.A listener that gets informed if the network layer was initialized. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract void
Deprecated.Registers aClientSessionListener
.static void
addNetworkInitializedListener
(NetworkContext.NetworkInitializedListener initializedListener) Deprecated.Registers anNetworkContext.NetworkInitializedListener
.static NetworkContext
get()
Deprecated.This returns theNetworkContext
.Deprecated.Returns a list of all clients known by this server.static boolean
Deprecated.Checks if theNetworkContext
was initialized.abstract void
Deprecated.Removes a previous registeredClientSessionListener
.static void
removeNetworkInitializedListener
(NetworkContext.NetworkInitializedListener initializedListener) Deprecated.Removes anNetworkContext.NetworkInitializedListener
.protected static void
set
(NetworkContext connectionContext) Deprecated.This is an automatic setter used by thecom.levigo.jadice.web.transport.server.TransportWebtoolkitFilter
in order to set theNetworkContext
and inform allNetworkContext.NetworkInitializedListener
s 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
Client
s
-
get
Deprecated.This returns theNetworkContext
. TheNetworkContext
gets initialized by thecom.levigo.jadice.web.transport.server.TransportWebtoolkitFilter
and 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
, ornull
if none was initialize yet
-
set
Deprecated.This is an automatic setter used by thecom.levigo.jadice.web.transport.server.TransportWebtoolkitFilter
in order to set theNetworkContext
and inform allNetworkContext.NetworkInitializedListener
s 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 theNetworkContext
was initialized. If this yieldstrue
,get()
can be called to obtain the currentNetworkContext
instance.- Returns:
true
if theNetworkContext
was initialized,false
if not
-