|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ResourceKindPool
A ResourceKindPool
represents a pool of ResourceKind
that can
be used to satisfy requests.
Use #checkOut(SDataRequest, String)
to get a ResourceKind
to
satisfy a request and
checkIn(ResourceKind, SDataRequest, ResourceResponse, RuntimeException)
to return it, once done.
This allows for intelligent reuse of ResourceKind
s such as using the
same object to satisfy a request for a subsequent page of a feed, etc.
Method Summary | |
---|---|
void |
checkIn(ResourceKind resourceKind,
SDataRequest request,
ResourceResponse response,
java.lang.RuntimeException exception)
Checks the ResourceKind back into the pool. |
ResourceKind |
checkOut(SDataRequest request,
java.lang.String authToken)
Checks a ResourceKind out of the pool. |
java.util.Collection<SDataResourceKindInfo> |
getResourceKindInfo()
Gets the ResourceKindInfo for all the resources in the pool, or null. |
void |
shutdown()
Perform any cleanup of the pool during shutdown |
Method Detail |
---|
ResourceKind checkOut(SDataRequest request, java.lang.String authToken)
request
- the SDataRequest
for which a ResourceKind
is wantedauthToken
- the authorization token representing the user
ResourceKind
or nullvoid checkIn(ResourceKind resourceKind, SDataRequest request, ResourceResponse response, java.lang.RuntimeException exception)
resourceKind
- the ResourceKind originally checked out by checkOut(com.sage.orion.sdata.servlet.SDataRequest, java.lang.String)
request
- the original SDataRequest
for which the
checkOut(com.sage.orion.sdata.servlet.SDataRequest, java.lang.String)
occurredresponse
- the ResourceResponse
that is about to be returned, or
null if there is a throwableexception
- the RuntimeException
about to be converted to a
response, or null if there is a response.java.util.Collection<SDataResourceKindInfo> getResourceKindInfo()
void shutdown()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |