@Deprecated @ConsumerType public abstract class AbstractServiceReferenceConfig extends 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,
String name)
Deprecated.
Sets up this base configuration object.
|
Modifier and Type | Method and Description |
---|---|
String |
getInitParameter(String name)
Deprecated.
|
Enumeration<?> |
getInitParameterNames()
Deprecated.
|
protected String |
getName()
Deprecated.
Returns the name of this configuration object.
|
static 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, 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 Enumeration<?> getInitParameterNames()
public javax.servlet.ServletContext getServletContext()
protected String getName()
ServletConfig.getServletName()
or FilterConfig.getFilterName()
methods.public static String getName(org.osgi.framework.ServiceReference reference)
Copyright © 2015 The Apache Software Foundation. All rights reserved.