Package org.eclipse.jetty.server.handler
Class ContextHandler.Context
- java.lang.Object
-
- org.eclipse.jetty.util.AttributesMap
-
- org.eclipse.jetty.server.handler.ContextHandler.StaticContext
-
- org.eclipse.jetty.server.handler.ContextHandler.Context
-
- All Implemented Interfaces:
javax.servlet.ServletContext
,Attributes
,Dumpable
- Direct Known Subclasses:
ServletContextHandler.Context
- Enclosing class:
- ContextHandler
public class ContextHandler.Context extends ContextHandler.StaticContext
Context.A partial implementation of
ServletContext
. A complete implementation is provided by the derivedContextHandler
implementations.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.Attributes
Attributes.Wrapper
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
Dumpable.DumpableContainer
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
_enabled
protected boolean
_extendedListenerTypes
-
Constructor Summary
Constructors Modifier Constructor Description protected
Context()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addListener(java.lang.Class<? extends java.util.EventListener> listenerClass)
void
addListener(java.lang.String className)
<T extends java.util.EventListener>
voidaddListener(T t)
void
checkListener(java.lang.Class<? extends java.util.EventListener> listener)
void
declareRoles(java.lang.String... roleNames)
java.lang.Object
getAttribute(java.lang.String name)
java.util.Enumeration<java.lang.String>
getAttributeNames()
java.lang.ClassLoader
getClassLoader()
javax.servlet.ServletContext
getContext(java.lang.String uripath)
ContextHandler
getContextHandler()
java.lang.String
getContextPath()
java.lang.String
getInitParameter(java.lang.String name)
java.util.Enumeration<java.lang.String>
getInitParameterNames()
javax.servlet.descriptor.JspConfigDescriptor
getJspConfigDescriptor()
java.lang.String
getMimeType(java.lang.String file)
java.lang.String
getRealPath(java.lang.String path)
javax.servlet.RequestDispatcher
getRequestDispatcher(java.lang.String uriInContext)
java.net.URL
getResource(java.lang.String path)
java.io.InputStream
getResourceAsStream(java.lang.String path)
java.util.Set<java.lang.String>
getResourcePaths(java.lang.String path)
java.lang.String
getServletContextName()
java.lang.String
getVirtualServerName()
boolean
isEnabled()
boolean
isExtendedListenerTypes()
void
log(java.lang.Exception exception, java.lang.String msg)
void
log(java.lang.String msg)
void
log(java.lang.String message, java.lang.Throwable throwable)
void
removeAttribute(java.lang.String name)
void
setAttribute(java.lang.String name, java.lang.Object value)
void
setEnabled(boolean enabled)
void
setExtendedListenerTypes(boolean extended)
boolean
setInitParameter(java.lang.String name, java.lang.String value)
void
setJspConfigDescriptor(javax.servlet.descriptor.JspConfigDescriptor d)
java.lang.String
toString()
-
Methods inherited from class org.eclipse.jetty.server.handler.ContextHandler.StaticContext
addFilter, addFilter, addFilter, addServlet, addServlet, addServlet, createFilter, createInstance, createListener, createServlet, getDefaultSessionTrackingModes, getEffectiveMajorVersion, getEffectiveMinorVersion, getEffectiveSessionTrackingModes, getFilterRegistration, getFilterRegistrations, getMajorVersion, getMinorVersion, getNamedDispatcher, getServerInfo, getServlet, getServletNames, getServletRegistration, getServletRegistrations, getServlets, getSessionCookieConfig, setEffectiveMajorVersion, setEffectiveMinorVersion, setSessionTrackingModes
-
Methods inherited from class org.eclipse.jetty.util.AttributesMap
addAll, clearAttributes, dump, dump, getAttributeEntrySet, getAttributeNamesCopy, getAttributeNameSet, size
-
-
-
-
Method Detail
-
getContextHandler
public ContextHandler getContextHandler()
-
getContext
public javax.servlet.ServletContext getContext(java.lang.String uripath)
- Specified by:
getContext
in interfacejavax.servlet.ServletContext
- Overrides:
getContext
in classContextHandler.StaticContext
-
getMimeType
public java.lang.String getMimeType(java.lang.String file)
- Specified by:
getMimeType
in interfacejavax.servlet.ServletContext
- Overrides:
getMimeType
in classContextHandler.StaticContext
-
getRequestDispatcher
public javax.servlet.RequestDispatcher getRequestDispatcher(java.lang.String uriInContext)
- Specified by:
getRequestDispatcher
in interfacejavax.servlet.ServletContext
- Overrides:
getRequestDispatcher
in classContextHandler.StaticContext
-
getRealPath
public java.lang.String getRealPath(java.lang.String path)
- Specified by:
getRealPath
in interfacejavax.servlet.ServletContext
- Overrides:
getRealPath
in classContextHandler.StaticContext
-
getResource
public java.net.URL getResource(java.lang.String path) throws java.net.MalformedURLException
- Specified by:
getResource
in interfacejavax.servlet.ServletContext
- Overrides:
getResource
in classContextHandler.StaticContext
- Throws:
java.net.MalformedURLException
-
getResourceAsStream
public java.io.InputStream getResourceAsStream(java.lang.String path)
- Specified by:
getResourceAsStream
in interfacejavax.servlet.ServletContext
- Overrides:
getResourceAsStream
in classContextHandler.StaticContext
-
getResourcePaths
public java.util.Set<java.lang.String> getResourcePaths(java.lang.String path)
- Specified by:
getResourcePaths
in interfacejavax.servlet.ServletContext
- Overrides:
getResourcePaths
in classContextHandler.StaticContext
-
log
public void log(java.lang.Exception exception, java.lang.String msg)
- Specified by:
log
in interfacejavax.servlet.ServletContext
- Overrides:
log
in classContextHandler.StaticContext
-
log
public void log(java.lang.String msg)
- Specified by:
log
in interfacejavax.servlet.ServletContext
- Overrides:
log
in classContextHandler.StaticContext
-
log
public void log(java.lang.String message, java.lang.Throwable throwable)
- Specified by:
log
in interfacejavax.servlet.ServletContext
- Overrides:
log
in classContextHandler.StaticContext
-
getInitParameter
public java.lang.String getInitParameter(java.lang.String name)
- Specified by:
getInitParameter
in interfacejavax.servlet.ServletContext
- Overrides:
getInitParameter
in classContextHandler.StaticContext
-
getInitParameterNames
public java.util.Enumeration<java.lang.String> getInitParameterNames()
- Specified by:
getInitParameterNames
in interfacejavax.servlet.ServletContext
- Overrides:
getInitParameterNames
in classContextHandler.StaticContext
-
getAttribute
public java.lang.Object getAttribute(java.lang.String name)
- Specified by:
getAttribute
in interfaceAttributes
- Specified by:
getAttribute
in interfacejavax.servlet.ServletContext
- Overrides:
getAttribute
in classAttributesMap
-
getAttributeNames
public java.util.Enumeration<java.lang.String> getAttributeNames()
- Specified by:
getAttributeNames
in interfaceAttributes
- Specified by:
getAttributeNames
in interfacejavax.servlet.ServletContext
- Overrides:
getAttributeNames
in classAttributesMap
-
setAttribute
public void setAttribute(java.lang.String name, java.lang.Object value)
- Specified by:
setAttribute
in interfaceAttributes
- Specified by:
setAttribute
in interfacejavax.servlet.ServletContext
- Overrides:
setAttribute
in classAttributesMap
-
removeAttribute
public void removeAttribute(java.lang.String name)
- Specified by:
removeAttribute
in interfaceAttributes
- Specified by:
removeAttribute
in interfacejavax.servlet.ServletContext
- Overrides:
removeAttribute
in classAttributesMap
-
getServletContextName
public java.lang.String getServletContextName()
- Specified by:
getServletContextName
in interfacejavax.servlet.ServletContext
- Overrides:
getServletContextName
in classContextHandler.StaticContext
-
getContextPath
public java.lang.String getContextPath()
- Specified by:
getContextPath
in interfacejavax.servlet.ServletContext
- Overrides:
getContextPath
in classContextHandler.StaticContext
-
toString
public java.lang.String toString()
- Overrides:
toString
in classAttributesMap
-
setInitParameter
public boolean setInitParameter(java.lang.String name, java.lang.String value)
- Specified by:
setInitParameter
in interfacejavax.servlet.ServletContext
- Overrides:
setInitParameter
in classContextHandler.StaticContext
-
addListener
public void addListener(java.lang.String className)
- Specified by:
addListener
in interfacejavax.servlet.ServletContext
- Overrides:
addListener
in classContextHandler.StaticContext
-
addListener
public <T extends java.util.EventListener> void addListener(T t)
- Specified by:
addListener
in interfacejavax.servlet.ServletContext
- Overrides:
addListener
in classContextHandler.StaticContext
-
addListener
public void addListener(java.lang.Class<? extends java.util.EventListener> listenerClass)
- Specified by:
addListener
in interfacejavax.servlet.ServletContext
- Overrides:
addListener
in classContextHandler.StaticContext
-
checkListener
public void checkListener(java.lang.Class<? extends java.util.EventListener> listener) throws java.lang.IllegalStateException
- Throws:
java.lang.IllegalStateException
-
setExtendedListenerTypes
public void setExtendedListenerTypes(boolean extended)
-
isExtendedListenerTypes
public boolean isExtendedListenerTypes()
-
getClassLoader
public java.lang.ClassLoader getClassLoader()
- Specified by:
getClassLoader
in interfacejavax.servlet.ServletContext
- Overrides:
getClassLoader
in classContextHandler.StaticContext
-
getJspConfigDescriptor
public javax.servlet.descriptor.JspConfigDescriptor getJspConfigDescriptor()
- Specified by:
getJspConfigDescriptor
in interfacejavax.servlet.ServletContext
- Overrides:
getJspConfigDescriptor
in classContextHandler.StaticContext
-
setJspConfigDescriptor
public void setJspConfigDescriptor(javax.servlet.descriptor.JspConfigDescriptor d)
-
declareRoles
public void declareRoles(java.lang.String... roleNames)
- Specified by:
declareRoles
in interfacejavax.servlet.ServletContext
- Overrides:
declareRoles
in classContextHandler.StaticContext
-
setEnabled
public void setEnabled(boolean enabled)
-
isEnabled
public boolean isEnabled()
-
getVirtualServerName
public java.lang.String getVirtualServerName()
- Specified by:
getVirtualServerName
in interfacejavax.servlet.ServletContext
- Overrides:
getVirtualServerName
in classContextHandler.StaticContext
-
-