|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.glassfish.examples.http.RequestContext
@Singleton public class RequestContext
This is the request scope context. It houses all request scope objects. This is a proxiable scope, so care must be taken that all objects from this scope are proxiable
Constructor Summary | |
---|---|
RequestContext()
|
Method Summary | ||
---|---|---|
boolean |
containsKey(ActiveDescriptor<?> descriptor)
Determines if this context has a value for the given key |
|
|
findOrCreate(ActiveDescriptor<U> activeDescriptor,
ServiceHandle<?> root)
Creates a contextual instance of this ActiveDescriptor by calling its create method if there is no other matching contextual instance. |
|
Class<? extends Annotation> |
getScope()
The scope for which this is the context |
|
boolean |
isActive()
True if this context is active, false otherwise |
|
void |
shutdown()
Shut down this context. |
|
void |
startRequest()
Starts a request |
|
void |
stopRequest()
Stops a request (including properly disposing all the previous request objects) |
|
boolean |
supportsNullCreation()
Returns true if the findOrCreate method can return null |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RequestContext()
Method Detail |
---|
public void startRequest()
public void stopRequest()
public Class<? extends Annotation> getScope()
Context
getScope
in interface Context<RequestScope>
public <U> U findOrCreate(ActiveDescriptor<U> activeDescriptor, ServiceHandle<?> root)
Context
findOrCreate
in interface Context<RequestScope>
activeDescriptor
- The descriptor to use when creating instancesroot
- The extended provider for the outermost parent being created
public boolean containsKey(ActiveDescriptor<?> descriptor)
Context
containsKey
in interface Context<RequestScope>
descriptor
- The descriptor to look for in this context
public boolean isActive()
Context
isActive
in interface Context<RequestScope>
public boolean supportsNullCreation()
Context
supportsNullCreation
in interface Context<RequestScope>
public void shutdown()
Context
shutdown
in interface Context<RequestScope>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |