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
ConstructorsConstructorDescriptionDefaultContext(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 moreEventInterceptorinstances to add to the session.getMode()Returns the mode thatCoherenceis running in.Return any prefix to prepend to the scope name of the session.Return theSessioncreated by the provider, ornullif no session could be created.booleanReturntrueif the context contains a non-nullSessioninstance.booleanReturntrueif this context has been completed.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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 defaultSessionProviderinterceptors- 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.ContextReturns the mode thatCoherenceis running in.- Specified by:
getModein interfaceSessionProvider.Context- Returns:
- the mode that
Coherenceis running in
-
complete
Description copied from interface:SessionProvider.ContextComplete this context.- Specified by:
completein interfaceSessionProvider.Context- Parameters:
session- theSessioncreated by the provider.- Returns:
- a completed
SessionProvider.Contextcontaining theSession
-
complete
Description copied from interface:SessionProvider.ContextComplete this context without a session.This will cause the root provider to return a
nullsession without trying any further providers in its chain.- Specified by:
completein interfaceSessionProvider.Context- Returns:
- a completed empty
SessionProvider.Context
-
isComplete
public boolean isComplete()Description copied from interface:SessionProvider.ContextReturntrueif this context has been completed.- Specified by:
isCompletein interfaceSessionProvider.Context- Returns:
trueif this context has been completed
-
hasSession
public boolean hasSession()Description copied from interface:SessionProvider.ContextReturntrueif the context contains a non-nullSessioninstance.- Specified by:
hasSessionin interfaceSessionProvider.Context- Returns:
trueif the context contains a non-nullSessioninstance
-
getSession
Description copied from interface:SessionProvider.ContextReturn theSessioncreated by the provider, ornullif no session could be created.- Specified by:
getSessionin interfaceSessionProvider.Context- Returns:
- the
Sessioncreated by the provider ornullif no session could be created
-
defaultProvider
Description copied from interface:SessionProvider.ContextReturns the default session provider that may be used to delegate to for session creation.- Specified by:
defaultProviderin interfaceSessionProvider.Context- Returns:
- the default session provider
-
getInterceptors
Description copied from interface:SessionProvider.ContextReturns zero or moreEventInterceptorinstances to add to the session.- Specified by:
getInterceptorsin interfaceSessionProvider.Context- Returns:
- zero or more
EventInterceptorinstances to add to the session
-
getScopePrefix
Description copied from interface:SessionProvider.ContextReturn any prefix to prepend to the scope name of the session.- Specified by:
getScopePrefixin interfaceSessionProvider.Context- Returns:
- any prefix to prepend to the scope name of the session
-