@Deprecated
@ConsumerType
public abstract class AbstractServiceReferenceConfig
extends java.lang.Object
AbstractServiceReferenceConfig
may be used as a base class
to define ServletConfig
and FilterConfig
instances from OSGi ServiceReference
objects. The properties
of this service reference are used as the initialization parameters of the
configuration object.
The name of the servlet or filter may be retrieved from the service reference
by calling the static getName(ServiceReference)
method. This method
looks for the following service reference properties, assuming the first non-null
value found:
Constructor and Description |
---|
AbstractServiceReferenceConfig(javax.servlet.ServletContext servletContext,
org.osgi.framework.ServiceReference reference,
java.lang.String name)
Deprecated.
Sets up this base configuration object.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getInitParameter(java.lang.String name)
Deprecated.
|
java.util.Enumeration<?> |
getInitParameterNames()
Deprecated.
|
protected java.lang.String |
getName()
Deprecated.
Returns the name of this configuration object.
|
static java.lang.String |
getName(org.osgi.framework.ServiceReference reference)
Deprecated.
Looks for a name value in the service reference properties.
|
javax.servlet.ServletContext |
getServletContext()
Deprecated.
|
public AbstractServiceReferenceConfig(javax.servlet.ServletContext servletContext, org.osgi.framework.ServiceReference reference, java.lang.String name)
servletContext
- The ServletContext
attached to this
configuration.reference
- The service reference providing the initialization
parameter values.name
- The name of this configuration.getName()
public java.lang.String getInitParameter(java.lang.String name)
public java.util.Enumeration<?> getInitParameterNames()
public javax.servlet.ServletContext getServletContext()
protected java.lang.String getName()
ServletConfig.getServletName()
or FilterConfig.getFilterName()
methods.public static java.lang.String getName(org.osgi.framework.ServiceReference reference)
reference
- The service referenceCopyright © 2022 The Apache Software Foundation. All rights reserved.