Class ServletContextAdaptor
- java.lang.Object
-
- org.adempiere.eclipse.equinox.http.servlet.ServletContextAdaptor
-
- All Implemented Interfaces:
javax.servlet.ServletContext
public class ServletContextAdaptor extends Object implements javax.servlet.ServletContext
-
-
Constructor Summary
Constructors Constructor Description ServletContextAdaptor(ProxyContext proxyContext, javax.servlet.ServletContext servletContext, org.osgi.service.http.HttpContext httpContext, AccessControlContext acc)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description javax.servlet.FilterRegistration.Dynamic
addFilter(String arg0, Class<? extends javax.servlet.Filter> arg1)
javax.servlet.FilterRegistration.Dynamic
addFilter(String arg0, String arg1)
javax.servlet.FilterRegistration.Dynamic
addFilter(String arg0, javax.servlet.Filter arg1)
javax.servlet.ServletRegistration.Dynamic
addJspFile(String servletName, String jspFile)
void
addListener(Class<? extends EventListener> arg0)
void
addListener(String arg0)
void
addListener(EventListener arg0)
javax.servlet.ServletRegistration.Dynamic
addServlet(String arg0, Class<? extends javax.servlet.Servlet> arg1)
javax.servlet.ServletRegistration.Dynamic
addServlet(String arg0, String arg1)
javax.servlet.ServletRegistration.Dynamic
addServlet(String arg0, javax.servlet.Servlet arg1)
<T extends javax.servlet.Filter>
TcreateFilter(Class<T> arg0)
<T extends EventListener>
TcreateListener(Class<T> arg0)
<T extends javax.servlet.Servlet>
TcreateServlet(Class<T> arg0)
void
declareRoles(String... arg0)
Object
getAttribute(String attributeName)
Enumeration<String>
getAttributeNames()
ClassLoader
getClassLoader()
javax.servlet.ServletContext
getContext(String arg0)
String
getContextPath()
Set<javax.servlet.SessionTrackingMode>
getDefaultSessionTrackingModes()
int
getEffectiveMajorVersion()
int
getEffectiveMinorVersion()
Set<javax.servlet.SessionTrackingMode>
getEffectiveSessionTrackingModes()
javax.servlet.FilterRegistration
getFilterRegistration(String arg0)
Map<String,? extends javax.servlet.FilterRegistration>
getFilterRegistrations()
String
getInitParameter(String arg0)
Enumeration<String>
getInitParameterNames()
javax.servlet.descriptor.JspConfigDescriptor
getJspConfigDescriptor()
int
getMajorVersion()
String
getMimeType(String name)
int
getMinorVersion()
javax.servlet.RequestDispatcher
getNamedDispatcher(String arg0)
String
getRealPath(String arg0)
String
getRequestCharacterEncoding()
javax.servlet.RequestDispatcher
getRequestDispatcher(String arg0)
URL
getResource(String name)
InputStream
getResourceAsStream(String name)
Set<String>
getResourcePaths(String name)
String
getResponseCharacterEncoding()
String
getServerInfo()
javax.servlet.Servlet
getServlet(String arg0)
Deprecated.String
getServletContextName()
Enumeration<String>
getServletNames()
Deprecated.javax.servlet.ServletRegistration
getServletRegistration(String arg0)
Map<String,? extends javax.servlet.ServletRegistration>
getServletRegistrations()
Enumeration<javax.servlet.Servlet>
getServlets()
Deprecated.javax.servlet.SessionCookieConfig
getSessionCookieConfig()
int
getSessionTimeout()
String
getVirtualServerName()
void
log(Exception arg0, String arg1)
Deprecated.void
log(String arg0)
void
log(String arg0, Throwable arg1)
void
removeAttribute(String attributeName)
void
setAttribute(String attributeName, Object attributeValue)
boolean
setInitParameter(String arg0, String arg1)
void
setRequestCharacterEncoding(String encoding)
void
setResponseCharacterEncoding(String encoding)
void
setSessionTimeout(int sessionTimeout)
void
setSessionTrackingModes(Set<javax.servlet.SessionTrackingMode> arg0)
-
-
-
Constructor Detail
-
ServletContextAdaptor
public ServletContextAdaptor(ProxyContext proxyContext, javax.servlet.ServletContext servletContext, org.osgi.service.http.HttpContext httpContext, AccessControlContext acc)
-
-
Method Detail
-
getResourcePaths
public Set<String> getResourcePaths(String name)
- Specified by:
getResourcePaths
in interfacejavax.servlet.ServletContext
- See Also:
This method was added in the Servlet 2.3 API however the OSGi HttpService currently does not provide support for this method in the HttpContext interface. To support "getResourcePaths(...) this implementation uses reflection to check for and then call the associated HttpContext.getResourcePaths(...) method opportunistically. Null is returned if the method is not present or fails.
-
getAttribute
public Object getAttribute(String attributeName)
- Specified by:
getAttribute
in interfacejavax.servlet.ServletContext
-
getAttributeNames
public Enumeration<String> getAttributeNames()
- Specified by:
getAttributeNames
in interfacejavax.servlet.ServletContext
-
setAttribute
public void setAttribute(String attributeName, Object attributeValue)
- Specified by:
setAttribute
in interfacejavax.servlet.ServletContext
-
removeAttribute
public void removeAttribute(String attributeName)
- Specified by:
removeAttribute
in interfacejavax.servlet.ServletContext
-
getMimeType
public String getMimeType(String name)
- Specified by:
getMimeType
in interfacejavax.servlet.ServletContext
-
getResource
public URL getResource(String name)
- Specified by:
getResource
in interfacejavax.servlet.ServletContext
-
getResourceAsStream
public InputStream getResourceAsStream(String name)
- Specified by:
getResourceAsStream
in interfacejavax.servlet.ServletContext
-
getContext
public javax.servlet.ServletContext getContext(String arg0)
- Specified by:
getContext
in interfacejavax.servlet.ServletContext
-
getInitParameter
public String getInitParameter(String arg0)
- Specified by:
getInitParameter
in interfacejavax.servlet.ServletContext
-
getInitParameterNames
public Enumeration<String> getInitParameterNames()
- Specified by:
getInitParameterNames
in interfacejavax.servlet.ServletContext
-
getMajorVersion
public int getMajorVersion()
- Specified by:
getMajorVersion
in interfacejavax.servlet.ServletContext
-
getMinorVersion
public int getMinorVersion()
- Specified by:
getMinorVersion
in interfacejavax.servlet.ServletContext
-
getNamedDispatcher
public javax.servlet.RequestDispatcher getNamedDispatcher(String arg0)
- Specified by:
getNamedDispatcher
in interfacejavax.servlet.ServletContext
-
getRealPath
public String getRealPath(String arg0)
- Specified by:
getRealPath
in interfacejavax.servlet.ServletContext
-
getRequestDispatcher
public javax.servlet.RequestDispatcher getRequestDispatcher(String arg0)
- Specified by:
getRequestDispatcher
in interfacejavax.servlet.ServletContext
-
getServerInfo
public String getServerInfo()
- Specified by:
getServerInfo
in interfacejavax.servlet.ServletContext
-
getServlet
public javax.servlet.Servlet getServlet(String arg0) throws javax.servlet.ServletException
Deprecated.- Specified by:
getServlet
in interfacejavax.servlet.ServletContext
- Throws:
javax.servlet.ServletException
-
getServletContextName
public String getServletContextName()
- Specified by:
getServletContextName
in interfacejavax.servlet.ServletContext
-
getServletNames
public Enumeration<String> getServletNames()
Deprecated.- Specified by:
getServletNames
in interfacejavax.servlet.ServletContext
-
getServlets
public Enumeration<javax.servlet.Servlet> getServlets()
Deprecated.- Specified by:
getServlets
in interfacejavax.servlet.ServletContext
-
log
public void log(Exception arg0, String arg1)
Deprecated.- Specified by:
log
in interfacejavax.servlet.ServletContext
-
log
public void log(String arg0, Throwable arg1)
- Specified by:
log
in interfacejavax.servlet.ServletContext
-
log
public void log(String arg0)
- Specified by:
log
in interfacejavax.servlet.ServletContext
-
getContextPath
public String getContextPath()
- Specified by:
getContextPath
in interfacejavax.servlet.ServletContext
-
addFilter
public javax.servlet.FilterRegistration.Dynamic addFilter(String arg0, String arg1)
- Specified by:
addFilter
in interfacejavax.servlet.ServletContext
-
addFilter
public javax.servlet.FilterRegistration.Dynamic addFilter(String arg0, javax.servlet.Filter arg1)
- Specified by:
addFilter
in interfacejavax.servlet.ServletContext
-
addFilter
public javax.servlet.FilterRegistration.Dynamic addFilter(String arg0, Class<? extends javax.servlet.Filter> arg1)
- Specified by:
addFilter
in interfacejavax.servlet.ServletContext
-
addListener
public void addListener(String arg0)
- Specified by:
addListener
in interfacejavax.servlet.ServletContext
-
addListener
public void addListener(EventListener arg0)
- Specified by:
addListener
in interfacejavax.servlet.ServletContext
-
addListener
public void addListener(Class<? extends EventListener> arg0)
- Specified by:
addListener
in interfacejavax.servlet.ServletContext
-
addServlet
public javax.servlet.ServletRegistration.Dynamic addServlet(String arg0, String arg1)
- Specified by:
addServlet
in interfacejavax.servlet.ServletContext
-
addServlet
public javax.servlet.ServletRegistration.Dynamic addServlet(String arg0, javax.servlet.Servlet arg1)
- Specified by:
addServlet
in interfacejavax.servlet.ServletContext
-
addServlet
public javax.servlet.ServletRegistration.Dynamic addServlet(String arg0, Class<? extends javax.servlet.Servlet> arg1)
- Specified by:
addServlet
in interfacejavax.servlet.ServletContext
-
createFilter
public <T extends javax.servlet.Filter> T createFilter(Class<T> arg0) throws javax.servlet.ServletException
- Specified by:
createFilter
in interfacejavax.servlet.ServletContext
- Throws:
javax.servlet.ServletException
-
createListener
public <T extends EventListener> T createListener(Class<T> arg0) throws javax.servlet.ServletException
- Specified by:
createListener
in interfacejavax.servlet.ServletContext
- Throws:
javax.servlet.ServletException
-
createServlet
public <T extends javax.servlet.Servlet> T createServlet(Class<T> arg0) throws javax.servlet.ServletException
- Specified by:
createServlet
in interfacejavax.servlet.ServletContext
- Throws:
javax.servlet.ServletException
-
declareRoles
public void declareRoles(String... arg0)
- Specified by:
declareRoles
in interfacejavax.servlet.ServletContext
-
getClassLoader
public ClassLoader getClassLoader()
- Specified by:
getClassLoader
in interfacejavax.servlet.ServletContext
-
getDefaultSessionTrackingModes
public Set<javax.servlet.SessionTrackingMode> getDefaultSessionTrackingModes()
- Specified by:
getDefaultSessionTrackingModes
in interfacejavax.servlet.ServletContext
-
getEffectiveMajorVersion
public int getEffectiveMajorVersion()
- Specified by:
getEffectiveMajorVersion
in interfacejavax.servlet.ServletContext
-
getEffectiveMinorVersion
public int getEffectiveMinorVersion()
- Specified by:
getEffectiveMinorVersion
in interfacejavax.servlet.ServletContext
-
getEffectiveSessionTrackingModes
public Set<javax.servlet.SessionTrackingMode> getEffectiveSessionTrackingModes()
- Specified by:
getEffectiveSessionTrackingModes
in interfacejavax.servlet.ServletContext
-
getFilterRegistration
public javax.servlet.FilterRegistration getFilterRegistration(String arg0)
- Specified by:
getFilterRegistration
in interfacejavax.servlet.ServletContext
-
getFilterRegistrations
public Map<String,? extends javax.servlet.FilterRegistration> getFilterRegistrations()
- Specified by:
getFilterRegistrations
in interfacejavax.servlet.ServletContext
-
getJspConfigDescriptor
public javax.servlet.descriptor.JspConfigDescriptor getJspConfigDescriptor()
- Specified by:
getJspConfigDescriptor
in interfacejavax.servlet.ServletContext
-
getServletRegistration
public javax.servlet.ServletRegistration getServletRegistration(String arg0)
- Specified by:
getServletRegistration
in interfacejavax.servlet.ServletContext
-
getServletRegistrations
public Map<String,? extends javax.servlet.ServletRegistration> getServletRegistrations()
- Specified by:
getServletRegistrations
in interfacejavax.servlet.ServletContext
-
getSessionCookieConfig
public javax.servlet.SessionCookieConfig getSessionCookieConfig()
- Specified by:
getSessionCookieConfig
in interfacejavax.servlet.ServletContext
-
setInitParameter
public boolean setInitParameter(String arg0, String arg1)
- Specified by:
setInitParameter
in interfacejavax.servlet.ServletContext
-
setSessionTrackingModes
public void setSessionTrackingModes(Set<javax.servlet.SessionTrackingMode> arg0)
- Specified by:
setSessionTrackingModes
in interfacejavax.servlet.ServletContext
-
getVirtualServerName
public String getVirtualServerName()
- Specified by:
getVirtualServerName
in interfacejavax.servlet.ServletContext
-
addJspFile
public javax.servlet.ServletRegistration.Dynamic addJspFile(String servletName, String jspFile)
- Specified by:
addJspFile
in interfacejavax.servlet.ServletContext
-
getSessionTimeout
public int getSessionTimeout()
- Specified by:
getSessionTimeout
in interfacejavax.servlet.ServletContext
-
setSessionTimeout
public void setSessionTimeout(int sessionTimeout)
- Specified by:
setSessionTimeout
in interfacejavax.servlet.ServletContext
-
getRequestCharacterEncoding
public String getRequestCharacterEncoding()
- Specified by:
getRequestCharacterEncoding
in interfacejavax.servlet.ServletContext
-
setRequestCharacterEncoding
public void setRequestCharacterEncoding(String encoding)
- Specified by:
setRequestCharacterEncoding
in interfacejavax.servlet.ServletContext
-
getResponseCharacterEncoding
public String getResponseCharacterEncoding()
- Specified by:
getResponseCharacterEncoding
in interfacejavax.servlet.ServletContext
-
setResponseCharacterEncoding
public void setResponseCharacterEncoding(String encoding)
- Specified by:
setResponseCharacterEncoding
in interfacejavax.servlet.ServletContext
-
-