Package com.tangosol.net
Class SessionProvider.DefaultContext
java.lang.Object
com.tangosol.net.SessionProvider.DefaultContext
- All Implemented Interfaces:
SessionProvider.Context
- Enclosing interface:
SessionProvider
public static class SessionProvider.DefaultContext
extends Object
implements SessionProvider.Context
-
Constructor Summary
ConstructorDescriptionDefaultContext
(Coherence.Mode mode, SessionProvider provider, Iterable<? extends EventInterceptor<?>> interceptors, String sScopePrefix) Create a new default context. -
Method Summary
Modifier and TypeMethodDescriptioncomplete()
Complete this context without a session.Complete this context.Returns the default session provider that may be used to delegate to for session creation.Iterable
<? extends EventInterceptor<?>> Returns zero or moreEventInterceptor
instances to add to the session.getMode()
Returns the mode thatCoherence
is running in.Return any prefix to prepend to the scope name of the session.Return theSession
created by the provider, ornull
if no session could be created.boolean
Returntrue
if the context contains a non-nullSession
instance.boolean
Returntrue
if this context has been completed.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.tangosol.net.SessionProvider.Context
createSession
-
Constructor Details
-
DefaultContext
public DefaultContext(Coherence.Mode mode, SessionProvider provider, Iterable<? extends EventInterceptor<?>> interceptors, String sScopePrefix) Create a new default context.- Parameters:
mode
- the mode to create the sessionprovider
- the defaultSessionProvider
interceptors
- the interceptors to add to the sessionsScopePrefix
- the prefix to prepend to the session scope- Throws:
NullPointerException
- if either parameter isnull
-
-
Method Details
-
getMode
Description copied from interface:SessionProvider.Context
Returns the mode thatCoherence
is running in.- Specified by:
getMode
in interfaceSessionProvider.Context
- Returns:
- the mode that
Coherence
is running in
-
complete
Description copied from interface:SessionProvider.Context
Complete this context.- Specified by:
complete
in interfaceSessionProvider.Context
- Parameters:
session
- theSession
created by the provider.- Returns:
- a completed
SessionProvider.Context
containing theSession
-
complete
Description copied from interface:SessionProvider.Context
Complete this context without a session.This will cause the root provider to return a
null
session without trying any further providers in its chain.- Specified by:
complete
in interfaceSessionProvider.Context
- Returns:
- a completed empty
SessionProvider.Context
-
isComplete
public boolean isComplete()Description copied from interface:SessionProvider.Context
Returntrue
if this context has been completed.- Specified by:
isComplete
in interfaceSessionProvider.Context
- Returns:
true
if this context has been completed
-
hasSession
public boolean hasSession()Description copied from interface:SessionProvider.Context
Returntrue
if the context contains a non-nullSession
instance.- Specified by:
hasSession
in interfaceSessionProvider.Context
- Returns:
true
if the context contains a non-nullSession
instance
-
getSession
Description copied from interface:SessionProvider.Context
Return theSession
created by the provider, ornull
if no session could be created.- Specified by:
getSession
in interfaceSessionProvider.Context
- Returns:
- the
Session
created by the provider ornull
if no session could be created
-
defaultProvider
Description copied from interface:SessionProvider.Context
Returns the default session provider that may be used to delegate to for session creation.- Specified by:
defaultProvider
in interfaceSessionProvider.Context
- Returns:
- the default session provider
-
getInterceptors
Description copied from interface:SessionProvider.Context
Returns zero or moreEventInterceptor
instances to add to the session.- Specified by:
getInterceptors
in interfaceSessionProvider.Context
- Returns:
- zero or more
EventInterceptor
instances to add to the session
-
getScopePrefix
Description copied from interface:SessionProvider.Context
Return any prefix to prepend to the scope name of the session.- Specified by:
getScopePrefix
in interfaceSessionProvider.Context
- Returns:
- any prefix to prepend to the scope name of the session
-