|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object m.c.m.proxyma.ProxymaFacade
public class ProxymaFacade
This class is the main interface (Facade) to intercact with Proxyma.
NOTE: this software is released under GPL License. See the LICENSE of this distribution for more informations.
Constructor Summary | |
---|---|
ProxymaFacade()
the default constructor for this class. |
Method Summary | |
---|---|
ProxymaContext |
createNewContext(java.lang.String contextName,
java.lang.String contextBaseURI,
java.lang.String configFilePath,
java.lang.String logsDirectoryPath)
Register a new Proxyma Context into the Application Environment. |
ProxyEngine |
createNewProxyEngine(ProxymaContext context)
This method creates a new instance of the Proxyma Proxy-Engine, the core of this project. |
ProxyFolderBean |
createNewProxyFolder(java.lang.String FolderName,
java.lang.String destination,
ProxymaContext context)
Builds a new default ProxyFolder to the specified destination setting. |
ProxymaResource |
createNewResource(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
ProxymaContext context)
This method creates a complete instance of ProxymaResource form a servlet request, a servlet response and a proxyma context. |
void |
destroyContext(ProxymaContext context)
Remove an existin Proxyma Context form the Application Environment. |
void |
disableProxyFolder(ProxyFolderBean theFolder)
Diable the passed proxyFolder |
void |
enableProxyFolder(ProxyFolderBean theFolder)
Enable the passed proxyFolder |
ProxymaContext |
getContextByName(java.lang.String contextName)
Obtain an existing context using its unique name. |
java.util.Collection<ProxyFolderBean> |
getContextProxyFolders(ProxymaContext context)
Returns all the proxyFolders form the passed context. |
ProxyFolderBean |
getProxyFolderByURLEncodedName(java.lang.String urlEncodedName,
ProxymaContext context)
Get from the passed context an existing proxyFolder searching it by its URL encoded name |
java.util.Enumeration<java.lang.String> |
getRegisteredContextNames()
Returns an Enumeration of all the registered context names |
void |
removeProxyFolder(ProxyFolderBean theFolder,
ProxymaContext context)
Remove from the passed context an existing proxyFolder |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ProxymaFacade()
Method Detail |
---|
public ProxymaContext createNewContext(java.lang.String contextName, java.lang.String contextBaseURI, java.lang.String configFilePath, java.lang.String logsDirectoryPath) throws java.lang.IllegalArgumentException
contextName
- The unique name for the context to create. You will use it from now to operate with the context.contextBaseURI
- The base URI for this context. In other words, the URI to prepend to the "ProxyFolders".configFilePath
- An xml configuration file for the context.
java.lang.IllegalArgumentException
- if the context already existsProxymaContext
public void destroyContext(ProxymaContext context) throws org.apache.commons.lang.NullArgumentException, java.lang.IllegalArgumentException, java.lang.IllegalStateException
the
- context to unregister
java.lang.IllegalArgumentException
- if the doesn't exists
org.apache.commons.lang.NullArgumentException
- if a null argument is passed to this method
java.lang.IllegalStateException
- if the context is not emptypublic ProxymaContext getContextByName(java.lang.String contextName)
contextName
- the name of the context to retrive.
public java.util.Enumeration<java.lang.String> getRegisteredContextNames()
public ProxyFolderBean createNewProxyFolder(java.lang.String FolderName, java.lang.String destination, ProxymaContext context) throws org.apache.commons.lang.NullArgumentException, java.lang.IllegalArgumentException, java.io.UnsupportedEncodingException
FolderName
- the path (and name) of the proxy folder.destination
- the destination URI to masqueradecontext
- the proxyma context where to take default settings.
org.apache.commons.lang.NullArgumentException
- if some parameter is null
java.lang.IllegalArgumentException
- if the folder name or the destination parameter are invalid or malformed
java.io.UnsupportedEncodingException
- if the default encoding charset specified on the configuration is not supported.public ProxyFolderBean getProxyFolderByURLEncodedName(java.lang.String urlEncodedName, ProxymaContext context)
FolderName
- the folder to retrivecontext
- the context to inspect
public void removeProxyFolder(ProxyFolderBean theFolder, ProxymaContext context) throws java.lang.IllegalArgumentException, org.apache.commons.lang.NullArgumentException
theFolder
- the proxy folder to removecontext
- the context to inspect
java.lang.IllegalArgumentException
- if the context doesn't exist
org.apache.commons.lang.NullArgumentException
- if the argument is nullpublic void enableProxyFolder(ProxyFolderBean theFolder) throws org.apache.commons.lang.NullArgumentException
theFolder
- the proxy folder to removecontext
- the context to inspect
java.lang.IllegalArgumentException
- if the context doesn't exist
org.apache.commons.lang.NullArgumentException
- if the argument is nullpublic void disableProxyFolder(ProxyFolderBean theFolder) throws org.apache.commons.lang.NullArgumentException
theFolder
- the proxy folder to removecontext
- the context to inspect
java.lang.IllegalArgumentException
- if the context doesn't exist
org.apache.commons.lang.NullArgumentException
- if the argument is nullpublic java.util.Collection<ProxyFolderBean> getContextProxyFolders(ProxymaContext context)
context
- the context to inspect for folders
public ProxymaResource createNewResource(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, ProxymaContext context) throws org.apache.commons.lang.NullArgumentException
request
- the servlet container request.response
- the servlet container responsecontext
- the proxyma context where the resource will live.
org.apache.commons.lang.NullArgumentException
- if any of the passed parameters is nullpublic ProxyEngine createNewProxyEngine(ProxymaContext context) throws java.lang.IllegalAccessException
context
- the context where the proxy will work
java.lang.IllegalAccessException
- if there are some troubles with the plugins loading.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |