org.jboss.bootstrap.spi.mc.server
Class MCServerFactory

java.lang.Object
  extended by org.jboss.bootstrap.spi.mc.server.MCServerFactory

public class MCServerFactory
extends Object

MCServerFactory Factory of MCServer implementations

Version:
$Revision: $
Author:
ALR

Field Summary
static String DEFAULT_MC_SERVER_IMPL_CLASS_NAME
          The FQN of the default server implementation class to create
 
Method Summary
static MCServer createServer()
          Creates an MCServer from the default implementation class name DEFAULT_MC_SERVER_IMPL_CLASS_NAME, using the Thread Context ClassLoader.
static MCServer createServer(ClassLoader cl)
          Creates an MCServer from the default implementation class name DEFAULT_MC_SERVER_IMPL_CLASS_NAME, using the specified ClassLoader.
static MCServer createServer(String implClassName, ClassLoader cl)
          Creates an MCServer from the specified implementation class name using the specified ClassLoader.
static MCServer createServerWithDefaultConfiguration()
          Creates an MCServer from the default implementation class name DEFAULT_MC_SERVER_IMPL_CLASS_NAME, using the Thread Context ClassLoader.
static MCServer createServerWithDefaultConfiguration(ClassLoader cl)
          Creates an MCServer from the default implementation class name DEFAULT_MC_SERVER_IMPL_CLASS_NAME, using the specified ClassLoader.
static MCServer createServerWithDefaultConfiguration(String implClassName, ClassLoader cl)
          Creates an MCServer from the specified implementation class name using the specified ClassLoader.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_MC_SERVER_IMPL_CLASS_NAME

public static final String DEFAULT_MC_SERVER_IMPL_CLASS_NAME
The FQN of the default server implementation class to create

See Also:
Constant Field Values
Method Detail

createServer

public static MCServer createServer()
Creates an MCServer from the default implementation class name DEFAULT_MC_SERVER_IMPL_CLASS_NAME, using the Thread Context ClassLoader. The returned server will additionally be created using the TCCL.

Returns:
The newly-created Server

createServerWithDefaultConfiguration

public static MCServer createServerWithDefaultConfiguration()
Creates an MCServer from the default implementation class name DEFAULT_MC_SERVER_IMPL_CLASS_NAME, using the Thread Context ClassLoader. The returned server will additionally be created using the TCCL. As a convenience, the server will contain a default configuration.

Returns:
The newly-created Server populated with a default configuration

createServer

public static MCServer createServer(ClassLoader cl)
                             throws IllegalArgumentException
Creates an MCServer from the default implementation class name DEFAULT_MC_SERVER_IMPL_CLASS_NAME, using the specified ClassLoader. The returned server will additionally be created using the ClassLoader denoted.

Returns:
The newly-created Server
Throws:
IllegalArgumentException - If the ClassLoader is null

createServerWithDefaultConfiguration

public static MCServer createServerWithDefaultConfiguration(ClassLoader cl)
                                                     throws IllegalArgumentException
Creates an MCServer from the default implementation class name DEFAULT_MC_SERVER_IMPL_CLASS_NAME, using the specified ClassLoader. The returned server will additionally be created using the ClassLoader denoted. As a convenience, the server will contain a default configuration.

Returns:
The newly-created Server populated with a default configuration
Throws:
IllegalArgumentException - If the ClassLoader is null

createServer

public static MCServer createServer(String implClassName,
                                    ClassLoader cl)
                             throws IllegalArgumentException,
                                    Exception
Creates an MCServer from the specified implementation class name using the specified ClassLoader. The returned server will additionally be created using the ClassLoader denoted.

Returns:
The newly-created Server
Throws:
IllegalArgumentException - If the ClassLoader or server implementation class is null
Exception - If there was an error in creating the Server

createServerWithDefaultConfiguration

public static MCServer createServerWithDefaultConfiguration(String implClassName,
                                                            ClassLoader cl)
                                                     throws IllegalArgumentException,
                                                            Exception
Creates an MCServer from the specified implementation class name using the specified ClassLoader. The returned server will additionally be created using the ClassLoader denoted. As a convenience, the server will contain a default configuration.

Returns:
The newly-created Server populated with a default configuration
Throws:
IllegalArgumentException - If the ClassLoader or server implementation class is null
Exception - If there was an error in creating the Server


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.