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:
IManagedJettyServerRegistry, org.osgi.service.cm.ManagedServiceFactory

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

Manages the deployment of jetty server instances. Not sure this is bringing much compared to the JettyServerServiceTracker.

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
static void createNewServer(org.osgi.framework.Bundle contributor, String serverName, String urlsToJettyXml)
          Helper method to create and configure a new Jetty Server via the ManagedServiceFactory
 void deleted(String pid)
           
 String getName()
          Return a descriptive name of this factory.
 ServerInstanceWrapper getServerByPID(String pid)
           
 ServerInstanceWrapper getServerInstanceWrapper(String managedServerName)
           
 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

getServerByPID

public ServerInstanceWrapper getServerByPID(String pid)

getServerInstanceWrapper

public ServerInstanceWrapper getServerInstanceWrapper(String managedServerName)
Specified by:
getServerInstanceWrapper in interface IManagedJettyServerRegistry
Parameters:
managedServerName - The server name
Returns:
the corresponding jetty server wrapped with its deployment properties.

createNewServer

public static void createNewServer(org.osgi.framework.Bundle contributor,
                                   String serverName,
                                   String urlsToJettyXml)
                            throws Exception
Helper method to create and configure a new Jetty Server via the ManagedServiceFactory

Parameters:
contributor -
serverName -
urlsToJettyXml -
Throws:
Exception


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