org.eclipse.jetty.osgi.boot.internal.serverfactory
Class JettyServersManagedFactory

java.lang.Object
  extended by org.eclipse.jetty.osgi.boot.internal.serverfactory.JettyServersManagedFactory
All Implemented Interfaces:
org.osgi.service.cm.ManagedServiceFactory

public class JettyServersManagedFactory
extends Object
implements org.osgi.service.cm.ManagedServiceFactory

This is a work in progress.
In particular there is a lot of work required during the update of the configuration of a server. It might not be practical to in fact support that and re-deploy the webapps in the same state than before the server was stopped.

jetty servers are managed as OSGi services registered here. try to find out if a configuration will fail (ports already opened etc).

Try to enable the creation and configuration of jetty servers in all the usual standard ways. The configuration of the server is defined by the properties passed to the service:

  1. First look for jettyfactory. If the value is a jetty server, use that server
  2. Then look for jettyhome key. The value should be a java.io.File or a String that is a path to the folder It is required that a etc/jetty.xml file will be loated from that folder.
  3. Then look for a jettyxml key. The value should be a java.io.File or an InputStream that contains a jetty configuration file.
  4. TODO: More ways to configure a jetty server? (other IOCs like spring, equinox properties...)
  5. Throw an exception if none of the relevant parameters are found

Author:
hmalphettes

Field Summary
static String JETTY_CONFIG_XML
          key to configure the server according to a jetty.xml file
static String JETTY_FACTORY
          invoke jetty-factory class.
static String JETTY_HOME
          key to configure the server according to a jetty home folder.
static String JETTY_HTTP_PORT
          default property in jetty.xml that is used as the value of the http port.
static String JETTY_HTTPS_PORT
          default property in jetty.xml that is used as the value of the https port.
 
Constructor Summary
JettyServersManagedFactory()
           
 
Method Summary
 void deleted(String pid)
           
 String getName()
          Return a descriptive name of this factory.
 void updated(String pid, Dictionary properties)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JETTY_HOME

public static final String JETTY_HOME
key to configure the server according to a jetty home folder. the value is the corresponding java.io.File

See Also:
Constant Field Values

JETTY_CONFIG_XML

public static final String JETTY_CONFIG_XML
key to configure the server according to a jetty.xml file

See Also:
Constant Field Values

JETTY_FACTORY

public static final String JETTY_FACTORY
invoke jetty-factory class. the value of this property is the instance of that class to call back.

See Also:
Constant Field Values

JETTY_HTTP_PORT

public static final String JETTY_HTTP_PORT
default property in jetty.xml that is used as the value of the http port.

See Also:
Constant Field Values

JETTY_HTTPS_PORT

public static final String JETTY_HTTPS_PORT
default property in jetty.xml that is used as the value of the https port.

See Also:
Constant Field Values
Constructor Detail

JettyServersManagedFactory

public JettyServersManagedFactory()
Method Detail

getName

public String getName()
Return a descriptive name of this factory.

Specified by:
getName in interface org.osgi.service.cm.ManagedServiceFactory
Returns:
the name for the factory, which might be localized

updated

public void updated(String pid,
                    Dictionary properties)
             throws org.osgi.service.cm.ConfigurationException
Specified by:
updated in interface org.osgi.service.cm.ManagedServiceFactory
Throws:
org.osgi.service.cm.ConfigurationException

deleted

public void deleted(String pid)
Specified by:
deleted in interface org.osgi.service.cm.ManagedServiceFactory


Copyright © 1995-2010 Mort Bay Consulting. All Rights Reserved.