org.apache.felix.http.jetty
Class Activator

java.lang.Object
  extended by org.apache.felix.http.jetty.Activator
All Implemented Interfaces:
org.osgi.framework.BundleActivator

public class Activator
extends java.lang.Object
implements org.osgi.framework.BundleActivator

Basic implementation of OSGi HTTP service 1.1. TODO: - fuller suite of testing and compatibility tests - only exposed params are those defined in the OSGi spec. Jetty is very tunable via params, some of which it may be useful to expose - no cacheing is performed on delivered resources. Although not part of the OSGi spec, it also isn't precluded and would enhance performance in a high usage environment. Jetty's ResourceHandler class could be a model for this. - scanning the Jetty ResourceHandler class it's clear that there are many other sophisticated areas to do with resource handling such as checking date and range fields in the http headers. It's not clear whether any of these play a part in the OSGi service - the spec just describes "returning the contents of the URL to the client" which doesn't state what other HTTP handling might be compliant or desirable


Nested Class Summary
 class Activator.HttpServiceFactory
           
 
Field Summary
protected static boolean debug
           
 
Constructor Summary
Activator()
           
 
Method Summary
static void debug(java.lang.String txt)
           
protected  void initializeHTTPS()
           
protected  void initializeJetty()
           
protected  void initializeJettyLogger()
           
static void log(int level, java.lang.String message, java.lang.Throwable throwable)
           
 void start(org.osgi.framework.BundleContext bundleContext)
           
 void stop(org.osgi.framework.BundleContext bundleContext)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

protected static boolean debug
Constructor Detail

Activator

public Activator()
Method Detail

start

public void start(org.osgi.framework.BundleContext bundleContext)
           throws org.osgi.framework.BundleException
Specified by:
start in interface org.osgi.framework.BundleActivator
Throws:
org.osgi.framework.BundleException

stop

public void stop(org.osgi.framework.BundleContext bundleContext)
          throws org.osgi.framework.BundleException
Specified by:
stop in interface org.osgi.framework.BundleActivator
Throws:
org.osgi.framework.BundleException

initializeJettyLogger

protected void initializeJettyLogger()

initializeJetty

protected void initializeJetty()
                        throws java.lang.Exception
Throws:
java.lang.Exception

initializeHTTPS

protected void initializeHTTPS()
                        throws java.lang.Exception
Throws:
java.lang.Exception

debug

public static void debug(java.lang.String txt)

log

public static void log(int level,
                       java.lang.String message,
                       java.lang.Throwable throwable)