it.eng.spago.cache
Class CacheResponseHandler
java.lang.Object
it.eng.spago.cache.CacheResponseHandler
- public class CacheResponseHandler
- extends java.lang.Object
This class is reponsible to cache the response of a service if the a envelope
is found on the configuration of the services ( under the or envelope
- Author:
- Andrea Zoppello
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
REACH_SERVICE
public static final java.lang.String REACH_SERVICE
- See Also:
- Constant Field Values
CACHED_RESPONSE
public static final java.lang.String CACHED_RESPONSE
- See Also:
- Constant Field Values
CACHED_RESPONSE_SB
public static final java.lang.String CACHED_RESPONSE_SB
- See Also:
- Constant Field Values
CACHED_RESPONSE_ATTRIBUTE
public static final java.lang.String CACHED_RESPONSE_ATTRIBUTE
- See Also:
- Constant Field Values
CacheResponseHandler
public CacheResponseHandler()
service
public static void service(RequestContainer requestContainer,
ResponseContainer responseContainer,
java.lang.String publisher)
- Parameters:
requestContainer
- Spago request containerresponseContainer
- Spago response containerpublisher
- the publieher that will be rendered after the response have been cached
This method determine the current service just executet that will be rendered
on the determinated publisher ( this method is called on the render method of the AdapterHTTP) and then
if from this services we can reach other services we'll cache the service response otherwise nothing is done
getCachedResponse
public static SourceBean getCachedResponse(SessionContainer permanentContainer)
throws SourceBeanException
- Parameters:
permanentContainer
- Spago session permanent conatiner
- Returns:
- The source bean under the permanent container that contains the cached responses
- Throws:
SourceBeanException
- This method return the source bean under the permanent container that will contain th cached responses