Class ServletInfo
java.lang.Object
org.apache.felix.http.base.internal.runtime.AbstractInfo<T>
org.apache.felix.http.base.internal.runtime.WhiteboardServiceInfo<jakarta.servlet.Servlet>
org.apache.felix.http.base.internal.runtime.ServletInfo
- All Implemented Interfaces:
Comparable<AbstractInfo<jakarta.servlet.Servlet>>
Provides registration information for a
Servlet
, and is used to programmatically register Servlet
s.
This class only provides information used at registration time, and as such differs slightly from DTO
s like, ServletDTO
.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor for Http ServiceServletInfo
(ResourceInfo resource) ServletInfo
(org.osgi.framework.ServiceReference<jakarta.servlet.Servlet> ref) -
Method Summary
Modifier and TypeMethodDescription@NotNull String
getClassName
(@NotNull jakarta.servlet.Servlet servlet) Get the class name of the servletString[]
Returns an unmodifiable map of the init parameters.getName()
String[]
@NotNull String
getType()
Get the type represented by this infoboolean
boolean
boolean
isSame
(AbstractInfo<jakarta.servlet.Servlet> other) Compare two info objectsboolean
isValid()
Methods inherited from class org.apache.felix.http.base.internal.runtime.WhiteboardServiceInfo
getContextSelection, getContextSelectionFilter
Methods inherited from class org.apache.felix.http.base.internal.runtime.AbstractInfo
compareTo, equals, getBooleanProperty, getInitParams, getRanking, getService, getServiceId, getServiceReference, getStringArrayProperty, getStringProperty, getTarget, hashCode, isEmpty, isEmpty, ungetService
-
Constructor Details
-
ServletInfo
public ServletInfo(org.osgi.framework.ServiceReference<jakarta.servlet.Servlet> ref) -
ServletInfo
-
ServletInfo
Constructor for Http Service- Parameters:
name
- The servlet namepattern
- The patterninitParams
- The init parameters
-
-
Method Details
-
isValid
public boolean isValid()- Overrides:
isValid
in classWhiteboardServiceInfo<jakarta.servlet.Servlet>
-
getName
-
getPatterns
-
getErrorPage
-
isAsyncSupported
public boolean isAsyncSupported() -
getInitParameters
Returns an unmodifiable map of the init parameters.- Returns:
- The init parameters
-
isResource
public boolean isResource() -
getPrefix
-
getMultipartConfig
-
getType
Description copied from class:AbstractInfo
Get the type represented by this info- Specified by:
getType
in classAbstractInfo<jakarta.servlet.Servlet>
- Returns:
- The type
-
getClassName
Get the class name of the servlet- Parameters:
servlet
- The servlet- Returns:
- The class name
-
isSame
Description copied from class:AbstractInfo
Compare two info objects- Overrides:
isSame
in classWhiteboardServiceInfo<jakarta.servlet.Servlet>
- Parameters:
other
- The other info object- Returns:
true
if the objects are the same
-