org.objectweb.easybeans.server
Class EmbeddedConfigurator

java.lang.Object
  extended by org.objectweb.easybeans.server.EmbeddedConfigurator

public final class EmbeddedConfigurator
extends java.lang.Object

Allows to configure an embedded server with an XML configuration file.

Author:
Florent Benoit

Field Summary
private static java.lang.String CONFIGURATION_FILE_NAME
          Name of the Default XML configuration file.
private static JLog logger
          Logger.
 
Constructor Summary
private EmbeddedConfigurator()
          Utility class, no public constructor.
 
Method Summary
private static void configure(Embedded embedded, java.net.URL xmlConfigurationURL)
          Configure the given embedded server with the xml configuration file.
static Embedded create()
          Create and configure an embedded server with the XML configuration file URL found in classpath.
static Embedded create(java.net.URL xmlConfigurationURL)
          Create and configure an embedded server with the given XML configuration file URL.
static Embedded init(Embedded embedded, java.net.URL xmlConfigurationURL)
          Configure the given embedded server with the given XML configuration file URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONFIGURATION_FILE_NAME

private static final java.lang.String CONFIGURATION_FILE_NAME
Name of the Default XML configuration file.

See Also:
Constant Field Values

logger

private static JLog logger
Logger.

Constructor Detail

EmbeddedConfigurator

private EmbeddedConfigurator()
Utility class, no public constructor.

Method Detail

init

public static Embedded init(Embedded embedded,
                            java.net.URL xmlConfigurationURL)
                     throws EmbeddedException
Configure the given embedded server with the given XML configuration file URL.

Parameters:
embedded - the embedded server to configure.
xmlConfigurationURL - the URL to the xml configuration file.
Returns:
the configured embedded instance.
Throws:
EmbeddedException - if the embedded configuration fails.

create

public static Embedded create(java.net.URL xmlConfigurationURL)
                       throws EmbeddedException
Create and configure an embedded server with the given XML configuration file URL.

Parameters:
xmlConfigurationURL - the URL to the xml configuration file.
Returns:
the configured embedded instance.
Throws:
EmbeddedException - if the embedded configuration fails.

create

public static Embedded create()
                       throws EmbeddedException
Create and configure an embedded server with the XML configuration file URL found in classpath.

Returns:
the configured embedded instance.
Throws:
EmbeddedException - if the embedded configuration fails.

configure

private static void configure(Embedded embedded,
                              java.net.URL xmlConfigurationURL)
                       throws EmbeddedException
Configure the given embedded server with the xml configuration file.

Parameters:
embedded - the embedded server to configure.
xmlConfigurationURL - the URL to the xml configuration file.
Throws:
EmbeddedException - if the embedded configuration fails.