it.eng.spago.cache
Class DynamicCacheResponsePublisher

java.lang.Object
  extended by it.eng.spago.presentation.AbstractPublisherDispatcher
      extended by it.eng.spago.cache.DynamicCacheResponsePublisher
All Implemented Interfaces:
InitializerIFace, PublisherDispatcherIFace

public class DynamicCacheResponsePublisher
extends AbstractPublisherDispatcher

Author:
zoppello - This is a Java publisher that MUST BE USED we we want to retrieve the cached reponse of previous service when the current service execution fails with errors

Constructor Summary
DynamicCacheResponsePublisher()
           
 
Method Summary
 void deleteCachedResponseForPublisher(RequestContainer requestContainer, java.lang.String publisherName)
           
 SourceBean getCachedResponseForPublisher(RequestContainer requestContainer, java.lang.String publisherName)
           
 java.lang.String getLastPublisherName(RequestContainer requestContainer)
           
 java.lang.String getPublisherName(RequestContainer requestContainer, ResponseContainer responseContainer)
           
 boolean isReachable(java.lang.String businessName)
           
 
Methods inherited from class it.eng.spago.presentation.AbstractPublisherDispatcher
getConfig, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DynamicCacheResponsePublisher

public DynamicCacheResponsePublisher()
Method Detail

getPublisherName

public java.lang.String getPublisherName(RequestContainer requestContainer,
                                         ResponseContainer responseContainer)
Parameters:
requestContainer - The spago request container
responseContainer - The spago response container If errors occurs during the execution of a service, the last publisher name and the cached response are retrieved and the render will be redirected on the last publisher. If execution of the current service is ok the render will be on the publisher configured in TARGET-PUBLISHER element of the java publisher

isReachable

public boolean isReachable(java.lang.String businessName)

getLastPublisherName

public java.lang.String getLastPublisherName(RequestContainer requestContainer)

getCachedResponseForPublisher

public SourceBean getCachedResponseForPublisher(RequestContainer requestContainer,
                                                java.lang.String publisherName)

deleteCachedResponseForPublisher

public void deleteCachedResponseForPublisher(RequestContainer requestContainer,
                                             java.lang.String publisherName)