com.sage.orion.sdata.servlet.swtservice
Class ResourceKindPoolImpl

java.lang.Object
  extended by com.sage.orion.sdata.servlet.swtservice.ResourceKindPoolImpl
All Implemented Interfaces:
ResourceKindPool

public class ResourceKindPoolImpl
extends java.lang.Object
implements ResourceKindPool

Author:
cliwa01 This class handles launching all the resource kind classes under the swtServices application.

Constructor Summary
ResourceKindPoolImpl(SDataServletContext sdataServletContext)
          Constructor.
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceKindPoolImpl

public ResourceKindPoolImpl(SDataServletContext sdataServletContext)
Constructor.

Parameters:
sdataServletContext -
Method Detail

checkIn

public void checkIn(ResourceKind resourceKind,
                    SDataRequest request,
                    ResourceResponse response,
                    java.lang.RuntimeException exception)
Description copied from interface: ResourceKindPool
Checks the ResourceKind back into the pool.

Specified by:
checkIn in interface ResourceKindPool
Parameters:
resourceKind - the ResourceKind originally checked out by ResourceKindPool.checkOut(com.sage.orion.sdata.servlet.SDataRequest, java.lang.String)
request - the original SDataRequest for which the ResourceKindPool.checkOut(com.sage.orion.sdata.servlet.SDataRequest, java.lang.String) occurred
response - the ResourceResponse that is about to be returned, or null if there is a throwable
exception - the RuntimeException about to be converted to a response, or null if there is a response.

checkOut

public ResourceKind checkOut(SDataRequest request,
                             java.lang.String authToken)
Description copied from interface: ResourceKindPool
Checks a ResourceKind out of the pool. If there is no ResourceKind available one is created.

Specified by:
checkOut in interface ResourceKindPool
Parameters:
request - the SDataRequest for which a ResourceKind is wanted
authToken - the authorization token representing the user
Returns:
a suitable ResourceKind or null

getResourceKindInfo

public java.util.Collection<SDataResourceKindInfo> getResourceKindInfo()
Description copied from interface: ResourceKindPool
Gets the ResourceKindInfo for all the resources in the pool, or null.

Specified by:
getResourceKindInfo in interface ResourceKindPool
Returns:
an unmodifiable collection of information or null

shutdown

public void shutdown()
Description copied from interface: ResourceKindPool
Perform any cleanup of the pool during shutdown

Specified by:
shutdown in interface ResourceKindPool


Copyright © 2011 Sage Software, Inc. All rights reserved.