it.eng.spago.cache
Class DynamicCacheResponsePublisher
java.lang.Object
it.eng.spago.presentation.AbstractPublisherDispatcher
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DynamicCacheResponsePublisher
public DynamicCacheResponsePublisher()
getPublisherName
public java.lang.String getPublisherName(RequestContainer requestContainer,
ResponseContainer responseContainer)
- Parameters:
requestContainer
- The spago request containerresponseContainer
- 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)