Class ServletContextDTO
- java.lang.Object
-
- org.osgi.dto.DTO
-
- org.osgi.service.http.runtime.dto.ServletContextDTO
-
- Direct Known Subclasses:
FailedServletContextDTO
public class ServletContextDTO extends org.osgi.dto.DTORepresents ajavax.servlet.ServletContextcreated for servlets, resources, servlet Filters, and listeners associated with that servlet context. The Servlet Context is usually backed by aServletContextHelperservice.
-
-
Field Summary
Fields Modifier and Type Field Description java.util.Map<java.lang.String,java.lang.Object>attributesThe servlet context attributes.java.lang.StringcontextPathThe servlet context path.ErrorPageDTO[]errorPageDTOsReturns the representations of the error pageServletservices associated with this context.FilterDTO[]filterDTOsReturns the representations of the servletFilterservices associated with this context.java.util.Map<java.lang.String,java.lang.String>initParamsThe servlet context initialization parameters.ListenerDTO[]listenerDTOsReturns the representations of the listener services associated with this context.java.lang.StringnameThe name of the servlet context.ResourceDTO[]resourceDTOsReturns the representations of the resource services associated with this context.longserviceIdService property identifying the servlet context.ServletDTO[]servletDTOsReturns the representations of theServletservices associated with this context.
-
Constructor Summary
Constructors Constructor Description ServletContextDTO()
-
-
-
Field Detail
-
name
public java.lang.String name
The name of the servlet context. The name of the correspondingServletContextHelper.This is the value returned by the
ServletContext.getServletContextName()method.
-
contextPath
public java.lang.String contextPath
The servlet context path. This is the value returned by theServletContext.getContextPath()method.
-
initParams
public java.util.Map<java.lang.String,java.lang.String> initParams
The servlet context initialization parameters. This is the set of parameters provided when registering this context. Additional parameters like the Http Service Runtime attributes are not included. If the context has no initialization parameters, this map is empty.
-
attributes
public java.util.Map<java.lang.String,java.lang.Object> attributes
The servlet context attributes.The value type must be a numerical type,
Boolean,String,DTOor an array of any of the former. Therefore this method will only return the attributes of the servlet context conforming to this constraint. Other attributes are omitted. If there are no attributes conforming to the constraint, an empty map is returned.
-
serviceId
public long serviceId
Service property identifying the servlet context. In the case of a servlet context backed by aServletContextHelperregistered in the service registry and picked up by a Http Whiteboard Implementation, this value is not negative and corresponds to the service id in the registry. If the servlet context is not backed by a service registered in the service registry, the value is negative and a unique negative value is generated by the Http Service Runtime in this case.
-
servletDTOs
public ServletDTO[] servletDTOs
Returns the representations of theServletservices associated with this context. The representations of theServletservices associated with this context. The returned array may be empty if this context is currently not associated with anyServletservices.
-
resourceDTOs
public ResourceDTO[] resourceDTOs
Returns the representations of the resource services associated with this context. The representations of the resource services associated with this context. The returned array may be empty if this context is currently not associated with any resource services.
-
filterDTOs
public FilterDTO[] filterDTOs
Returns the representations of the servletFilterservices associated with this context. The representations of the servletFilterservices associated with this context. The returned array may be empty if this context is currently not associated with any servletFilterservices.
-
errorPageDTOs
public ErrorPageDTO[] errorPageDTOs
Returns the representations of the error pageServletservices associated with this context. The representations of the error pageServletservices associated with this context. The returned array may be empty if this context is currently not associated with any error pages.
-
listenerDTOs
public ListenerDTO[] listenerDTOs
Returns the representations of the listener services associated with this context. The representations of the listener services associated with this context. The returned array may be empty if this context is currently not associated with any listener services.
-
-