public class SessionScope extends java.lang.Object implements Scope
RequestContextListener is used for accessing
the request and HttpSessionListenerBroadcaster is used for listening
session lifecycle.| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>> |
sessionInstances |
protected jodd.servlet.HttpSessionListenerBroadcaster |
sessionListeners |
| Constructor and Description |
|---|
SessionScope(PetiteContainer petiteContainer)
Session scope.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(Scope referenceScope)
Returns
true if a bean of referenced scope can be
injected into target bean of this scope. |
protected java.lang.String |
getHttpSessionId()
Returns request from current thread.
|
java.lang.Object |
lookup(java.lang.String name)
Lookups for bean name.
|
void |
register(java.lang.String name,
java.lang.Object bean)
Registers the bean within the current scope.
|
void |
remove(java.lang.String name)
Removes the bean from the scope entirely.
|
protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>> sessionInstances
protected final jodd.servlet.HttpSessionListenerBroadcaster sessionListeners
public SessionScope(PetiteContainer petiteContainer)
public java.lang.Object lookup(java.lang.String name)
Scoperegistration,
therefore it should returns null if object is not
yet registered.public void register(java.lang.String name,
java.lang.Object bean)
Scopepublic void remove(java.lang.String name)
Scopepublic boolean accept(Scope referenceScope)
Scopetrue if a bean of referenced scope can be
injected into target bean of this scope. Otherwise, returns
false, which may be a sign for scoped proxy to be
injected.
In general, injection of 'shorter' reference scopes
into the 'longer' target scopes should not be accepted.
In other words, if reference scope is 'longer' or equal (same),
this method should return true.
protected java.lang.String getHttpSessionId()
Copyright © 2003-2013 Jodd Team