Class DownloadServlet.Context
- java.lang.Object
-
- org.glassfish.admingui.common.servlet.DownloadServlet.Context
-
- Enclosing class:
- DownloadServlet
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. TheDownloadServlet
is responsible for supplying this object to theDownloadServlet.ContentSource
.
-
-
Constructor Summary
Constructors Constructor Description Context()
The default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
getAttribute(String name)
This method may be used to manage arbitrary information between theDownloadServlet
and theDownloadServlet.ContentSource
.jakarta.servlet.Servlet
getServlet()
This returns theServlet
associated with the request.jakarta.servlet.ServletConfig
getServletConfig()
This returns theServletConfig
.jakarta.servlet.ServletRequest
getServletRequest()
This returns theServletRequest
associated with the request.jakarta.servlet.ServletResponse
getServletResponse()
This returns theServletResponse
associated with the request.void
removeAttribute(String name)
This method may be used to manage arbitrary information between theDownloadServlet
and theDownloadServlet.ContentSource
.void
setAttribute(String name, Object value)
This method may be used to manage arbitrary information between theDownloadServlet
and theDownloadServlet.ContentSource
.protected void
setServlet(jakarta.servlet.Servlet servlet)
This sets theServlet
associated with the request.protected void
setServletConfig(jakarta.servlet.ServletConfig config)
This sets theServletConfig
.protected void
setServletRequest(jakarta.servlet.ServletRequest request)
This sets theServletRequest
associated with the request.protected void
setServletResponse(jakarta.servlet.ServletResponse response)
This sets theServletResponse
associated with the request.
-
-
-
Method Detail
-
getAttribute
public Object getAttribute(String name)
This method may be used to manage arbitrary information between the
DownloadServlet
and theDownloadServlet.ContentSource
. This method retrieves an attribute.
-
setAttribute
public void setAttribute(String name, Object value)
This method may be used to manage arbitrary information between the
DownloadServlet
and theDownloadServlet.ContentSource
. This method sets an attribute.
-
removeAttribute
public void removeAttribute(String name)
This method may be used to manage arbitrary information between the
DownloadServlet
and theDownloadServlet.ContentSource
. This method removes an attribute.
-
getServlet
public jakarta.servlet.Servlet getServlet()
This returns the
Servlet
associated with the request. This may be cast to the specificServlet
instance, such asHttpServlet
.
-
setServlet
protected void setServlet(jakarta.servlet.Servlet servlet)
This sets the
Servlet
associated with the request.
-
getServletConfig
public jakarta.servlet.ServletConfig getServletConfig()
This returns the
ServletConfig
.
-
setServletConfig
protected void setServletConfig(jakarta.servlet.ServletConfig config)
This sets the
ServletConfig
.
-
getServletRequest
public jakarta.servlet.ServletRequest getServletRequest()
This returns the
ServletRequest
associated with the request. This may be cast to the specific type, such asHttpServletRequest
.
-
setServletRequest
protected void setServletRequest(jakarta.servlet.ServletRequest request)
This sets the
ServletRequest
associated with the request.
-
getServletResponse
public jakarta.servlet.ServletResponse getServletResponse()
This returns the
ServletResponse
associated with the request. This may be cast to the specific type, such asHttpServletResponse
.
-
setServletResponse
protected void setServletResponse(jakarta.servlet.ServletResponse response)
This sets the
ServletResponse
associated with the request.
-
-