|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object m.c.m.proxyma.core.ProxyEngine
public class ProxyEngine
This class is the main skeleton of this whole project and is a mixture of many design patterns.
Its purpose is to manage a ProximaResource (that has a request inside) in order to fill the response with the requested data using
the provided plugins.
IMPORTANT: The engine guarantees that the preprocessors and the transformer are executed respecting the "executiPriority" defined
into the proxyma-config.xml. Plugins with a lower priority are execute first and plugins with an higher priority are executed lastly
(BTW: plugins with the same priority are executed in random order).
NOTE: this software is released under GPL License. See the LICENSE of this distribution for more informations.
Constructor Summary | |
---|---|
ProxyEngine(ProxymaContext context)
The constructor for this class. |
Method Summary | |
---|---|
int |
doProxy(ProxymaResource aResource)
This is the core method of this project. |
java.util.Collection<CacheProvider> |
getRegisteredCachePlugins()
Get a Collection of CacheProviders registered into the Engine. |
java.util.Collection<ResourceHandler> |
getRegisteredPluginsByType(ProxymaTags.HandlerType type)
Get a collection of the registered plugins by type. |
protected boolean |
isEnableShowFoldersListOnRootURI()
Get the new value for the flag If true, proxyma will show the list of the registered folders if the client access to the root uri of the proxy. |
protected void |
setAvailableCacheProviders(java.util.HashMap<java.lang.String,CacheProvider> availableCacheProviders)
Protected method to set the available cache providers. |
protected void |
setAvailablePreprocessors(java.util.HashMap<java.lang.String,ResourceHandler> availablePreprocessors)
Protected method to set the available preprocessor plugins. |
protected void |
setAvailableRetrivers(java.util.HashMap<java.lang.String,ResourceHandler> availableRetrivers)
Protected method to set the available retriver plugins. |
protected void |
setAvailableSerializers(java.util.HashMap<java.lang.String,ResourceHandler> availableSerializers)
Protected method to set the available serializer plugins. |
protected void |
setAvailableTransformers(java.util.HashMap<java.lang.String,ResourceHandler> availableTransformers)
Protected method to set the available transformer plugins. |
protected void |
setEnableShowFoldersListOnRootURI(boolean showFoldersListOnRootURI)
Sets the new value for the flag. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ProxyEngine(ProxymaContext context)
context
- the context to use to retrive configuration dataMethod Detail |
---|
public int doProxy(ProxymaResource aResource) throws java.io.IOException, java.lang.Exception
aResource
- a resource to masquerade by the proxy.
java.io.IOException
java.lang.Exception
public java.util.Collection<CacheProvider> getRegisteredCachePlugins()
public java.util.Collection<ResourceHandler> getRegisteredPluginsByType(ProxymaTags.HandlerType type)
type
- the type of the plugins that have to be returned
protected void setAvailableCacheProviders(java.util.HashMap<java.lang.String,CacheProvider> availableCacheProviders)
availableCacheProviders
- the new Map of availeble cache providers.ProxyEngineFactory
protected void setAvailablePreprocessors(java.util.HashMap<java.lang.String,ResourceHandler> availablePreprocessors)
availableCacheProviders
- the new Map of availeble preprocessors.ProxyEngineFactory
protected void setAvailableRetrivers(java.util.HashMap<java.lang.String,ResourceHandler> availableRetrivers)
availableCacheProviders
- the new Map of availeble retrivers.ProxyEngineFactory
protected void setAvailableSerializers(java.util.HashMap<java.lang.String,ResourceHandler> availableSerializers)
availableCacheProviders
- the new Map of availeble serializers.ProxyEngineFactory
protected void setAvailableTransformers(java.util.HashMap<java.lang.String,ResourceHandler> availableTransformers)
availableCacheProviders
- the new Map of availeble transformers.ProxyEngineFactory
protected boolean isEnableShowFoldersListOnRootURI()
protected void setEnableShowFoldersListOnRootURI(boolean showFoldersListOnRootURI)
enableShowFoldersListOnRootURI
- isShowFoldersListOnRootURI
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |