public class OfficeServletContextImpl extends Object implements OfficeServletContext
OfficeServletContext
implementation.Constructor and Description |
---|
OfficeServletContextImpl(String servletContextName,
Map<String,String> initParameters,
Map<String,String> fileExtensionToMimeType,
Properties filterConfiguration,
ClassLoader classLoader)
Initiate.
|
public OfficeServletContextImpl(String servletContextName, Map<String,String> initParameters, Map<String,String> fileExtensionToMimeType, Properties filterConfiguration, ClassLoader classLoader) throws javax.servlet.ServletException
servletContextName
- ServletContext
name.initParameters
- Init parameters.fileExtensionToMimeType
- Mapping of file extension to MIME type.filterConfiguration
- Filter
configuration.classLoader
- ClassLoader
.javax.servlet.ServletException
- If fails to initialise.public void init(ServletServer servletServer)
Loads the ServletServer
.
This method only uses the ServletServer
on first invocation.
After this point further invocations ignore the input
ServletServer
.
servletServer
- ServletServer
.public FilterChainFactory getFilterChainFactory(Office office) throws javax.servlet.ServletException
OfficeServletContext
Obtains the FilterChainFactory
for the Office
.
This is a non ServletContext
method and is provided as filtering
is applied across an application. It is expected that the
HttpServletContainer
will make use of this
FilterChainFactory
for filtering Servlet
servicing.
getFilterChainFactory
in interface OfficeServletContext
office
- Office
.FilterChainFactory
.javax.servlet.ServletException
- Filter
instances are lazy loaded and initialising may
fail for new Filter
instances.public ServletTaskReference mapPath(Office office, String path)
OfficeServletContext
Obtains the ServletTaskReference
to the Servlet
Task
corresponding the the input path.
This is a non ServletContext
method and is provided to allow
routing to a Servlet
for servicing the HttpRequest
.
mapPath
in interface OfficeServletContext
office
- Office
.path
- Path to be mapped to a Servlet
Task
.ServletTaskReference
for the path or null
if
path does not map to a Servlet
Task
.public String getContextPath(Office office)
getContextPath
in interface OfficeServletContext
office
- Office
.ServletContext.getContextPath()
public javax.servlet.ServletContext getContext(Office office, String uripath)
getContext
in interface OfficeServletContext
office
- Office
.uripath
- URI path.ServletContext
.ServletContext.getContext(String)
public String getMimeType(Office office, String file)
getMimeType
in interface OfficeServletContext
office
- Office
.file
- File name.ServletContext.getMimeType(String)
public Set getResourcePaths(Office office, String path)
getResourcePaths
in interface OfficeServletContext
office
- Office
.path
- Path.ServletContext.getResourcePaths(String)
public URL getResource(Office office, String path) throws MalformedURLException
getResource
in interface OfficeServletContext
office
- Office
.path
- Path.URL
.MalformedURLException
- If malformed URL
.ServletContext.getResource(String)
public InputStream getResourceAsStream(Office office, String path)
getResourceAsStream
in interface OfficeServletContext
office
- Office
.path
- Path.InputStream
.ServletContext.getResourceAsStream(String)
public javax.servlet.RequestDispatcher getRequestDispatcher(Office office, String path)
getRequestDispatcher
in interface OfficeServletContext
office
- Office
.path
- Path.RequestDispatcher
.ServletContext.getRequestDispatcher(String)
public javax.servlet.RequestDispatcher getNamedDispatcher(Office office, String name)
getNamedDispatcher
in interface OfficeServletContext
office
- Office
.name
- Name.RequestDispatcher
.ServletContext.getNamedDispatcher(String)
public void log(Office office, String msg)
log
in interface OfficeServletContext
office
- Office
.msg
- Message.ServletContext.log(String)
public void log(Office office, String message, Throwable throwable)
log
in interface OfficeServletContext
office
- Office
.message
- Message.throwable
- Cause.ServletContext.log(String, Throwable)
public String getRealPath(Office office, String path)
getRealPath
in interface OfficeServletContext
office
- Office
.path
- Path.ServletContext.getRealPath(String)
public String getServerInfo(Office office)
getServerInfo
in interface OfficeServletContext
office
- Office
.ServletContext.getServerInfo()
public String getInitParameter(Office office, String name)
getInitParameter
in interface OfficeServletContext
office
- Office
.name
- Name.ServletContext.getInitParameter(String)
public Enumeration getInitParameterNames(Office office)
getInitParameterNames
in interface OfficeServletContext
office
- Office
.ServletContext.getInitParameterNames()
public Object getAttribute(Office office, String name)
getAttribute
in interface OfficeServletContext
office
- Office
.name
- Name.ServletContext.getAttribute(String)
public Enumeration getAttributeNames(Office office)
getAttributeNames
in interface OfficeServletContext
office
- Office
.ServletContext.getAttributeNames()
public void removeAttribute(Office office, String name)
removeAttribute
in interface OfficeServletContext
office
- Office
.name
- Name.ServletContext.removeAttribute(String)
public void setAttribute(Office office, String name, Object object)
setAttribute
in interface OfficeServletContext
office
- Office
.name
- Name.object
- Attribute value.ServletContext.setAttribute(String, Object)
public String getServletContextName(Office office)
getServletContextName
in interface OfficeServletContext
office
- Office
.ServletContext
name.ServletContext.getServletContextName()
Copyright © 2005–2016. All rights reserved.