it.eng.spago.cache
Class CacheResponseHandler

java.lang.Object
  extended byit.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

Field Summary
static java.lang.String CACHED_RESPONSE
           
static java.lang.String CACHED_RESPONSE_ATTRIBUTE
           
static java.lang.String CACHED_RESPONSE_SB
           
static java.lang.String REACH_SERVICE
           
 
Constructor Summary
CacheResponseHandler()
           
 
Method Summary
static SourceBean getCachedResponse(SessionContainer permanentContainer)
           
static void service(RequestContainer requestContainer, ResponseContainer responseContainer, java.lang.String publisher)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

CacheResponseHandler

public CacheResponseHandler()
Method Detail

service

public static void service(RequestContainer requestContainer,
                           ResponseContainer responseContainer,
                           java.lang.String publisher)
Parameters:
requestContainer - Spago request container
responseContainer - Spago response container
publisher - 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