SMILA 1.0 API documentation

org.eclipse.smila.http.server.util
Class AJettyHandlerService

java.lang.Object
  extended by org.eclipse.smila.http.server.util.AJettyHandlerService
All Implemented Interfaces:
JettyHandler
Direct Known Subclasses:
ResourceHandlerService, ServletContextService, WebappContextService

public abstract class AJettyHandlerService
extends java.lang.Object
implements JettyHandler

base class for declarative services for registering Jetty handlers in the htp server.

Author:
jschumacher

Field Summary
static java.lang.String PROPERTY_CONFIGBUNDLE
          Constant for the ComponentContext property "configBundle".
 
Constructor Summary
AJettyHandlerService()
           
 
Method Summary
protected  void activate(ComponentContext context)
          read #PROPERTY_ROOTCONTEXTPATH property.
protected  java.lang.String getConfigBundle()
           
protected  java.lang.String getConfigPathProperty(ComponentContext context, java.lang.String property)
          read property value.
 java.lang.String getRootContextPath()
          Returns the root path of the context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.smila.http.server.JettyHandler
getHandler
 

Field Detail

PROPERTY_CONFIGBUNDLE

public static final java.lang.String PROPERTY_CONFIGBUNDLE
Constant for the ComponentContext property "configBundle".

See Also:
Constant Field Values
Constructor Detail

AJettyHandlerService

public AJettyHandlerService()
Method Detail

activate

protected void activate(ComponentContext context)
read #PROPERTY_ROOTCONTEXTPATH property.

Parameters:
context - OSGi component context

getRootContextPath

public java.lang.String getRootContextPath()
Returns the root path of the context.

Specified by:
getRootContextPath in interface JettyHandler
Returns:
the root context path

getConfigBundle

protected java.lang.String getConfigBundle()
Returns:
the name of the bundle to read configs from, if set.

getConfigPathProperty

protected java.lang.String getConfigPathProperty(ComponentContext context,
                                                 java.lang.String property)
read property value. If PROPERTY_CONFIGBUNDLE is set, assume that the property value is a path relative to the bundle configuration directory. Else return the original value.

Parameters:
context - OSGi component context
property - property name
Returns:
see description.

SMILA 1.0 API documentation