public static class DownloadServlet.Context extends Object
This class provides information about the request that may be
necessary for the DownloadServlet.ContentSource
to
provide content. The DownloadServlet
is responsible
for supplying this object to the
DownloadServlet.ContentSource
.
Constructor and Description |
---|
Context()
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
Object |
getAttribute(String name)
This method may be used to manage arbitrary information between
the
DownloadServlet and the
DownloadServlet.ContentSource . |
javax.servlet.Servlet |
getServlet()
This returns the
Servlet associated with the
request. |
javax.servlet.ServletConfig |
getServletConfig()
This returns the
ServletConfig . |
javax.servlet.ServletRequest |
getServletRequest()
This returns the
ServletRequest associated with
the request. |
javax.servlet.ServletResponse |
getServletResponse()
This returns the
ServletResponse associated with
the request. |
void |
removeAttribute(String name)
This method may be used to manage arbitrary information between
the
DownloadServlet and the
DownloadServlet.ContentSource . |
void |
setAttribute(String name,
Object value)
This method may be used to manage arbitrary information between
the
DownloadServlet and the
DownloadServlet.ContentSource . |
protected void |
setServlet(javax.servlet.Servlet servlet)
This sets the
Servlet associated with the
request. |
protected void |
setServletConfig(javax.servlet.ServletConfig config)
This sets the
ServletConfig . |
protected void |
setServletRequest(javax.servlet.ServletRequest request)
This sets the
ServletRequest associated with the
request. |
protected void |
setServletResponse(javax.servlet.ServletResponse response)
This sets the
ServletResponse associated with the
request. |
public Object getAttribute(String name)
This method may be used to manage arbitrary information between
the DownloadServlet
and the
DownloadServlet.ContentSource
. This method
retrieves an attribute.
public void setAttribute(String name, Object value)
This method may be used to manage arbitrary information between
the DownloadServlet
and the
DownloadServlet.ContentSource
. This method sets
an attribute.
public void removeAttribute(String name)
This method may be used to manage arbitrary information between
the DownloadServlet
and the
DownloadServlet.ContentSource
. This method
removes an attribute.
public javax.servlet.Servlet getServlet()
This returns the Servlet
associated with the
request. This may be cast to the specific Servlet
instance, such as HttpServlet
.
protected void setServlet(javax.servlet.Servlet servlet)
This sets the Servlet
associated with the
request.
public javax.servlet.ServletConfig getServletConfig()
This returns the ServletConfig
.
protected void setServletConfig(javax.servlet.ServletConfig config)
This sets the ServletConfig
.
public javax.servlet.ServletRequest getServletRequest()
This returns the ServletRequest
associated with
the request. This may be cast to the specific type, such as
HttpServletRequest
.
protected void setServletRequest(javax.servlet.ServletRequest request)
This sets the ServletRequest
associated with the
request.
public javax.servlet.ServletResponse getServletResponse()
This returns the ServletResponse
associated with
the request. This may be cast to the specific type, such as
HttpServletResponse
.
protected void setServletResponse(javax.servlet.ServletResponse response)
This sets the ServletResponse
associated with the
request.
Copyright © 2019. All rights reserved.