[jboss-cvs] JBossAS SVN: r91840 - in projects/bootstrap/trunk: api and 43 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Jul 30 14:56:07 EDT 2009


Author: ALRubinger
Date: 2009-07-30 14:56:05 -0400 (Thu, 30 Jul 2009)
New Revision: 91840

Added:
   projects/bootstrap/trunk/api-as/
   projects/bootstrap/trunk/api-as/.classpath
   projects/bootstrap/trunk/api-as/.project
   projects/bootstrap/trunk/api-as/.settings/
   projects/bootstrap/trunk/api-as/.settings/org.eclipse.jdt.core.prefs
   projects/bootstrap/trunk/api-as/.settings/org.maven.ide.eclipse.prefs
   projects/bootstrap/trunk/api-as/pom.xml
   projects/bootstrap/trunk/api-as/src/
   projects/bootstrap/trunk/api-as/src/main/
   projects/bootstrap/trunk/api-as/src/main/java/
   projects/bootstrap/trunk/api-as/src/main/resources/
   projects/bootstrap/trunk/api-as/src/test/
   projects/bootstrap/trunk/api-as/src/test/java/
   projects/bootstrap/trunk/api-as/src/test/resources/
   projects/bootstrap/trunk/api/
   projects/bootstrap/trunk/api/.classpath
   projects/bootstrap/trunk/api/.project
   projects/bootstrap/trunk/api/.settings/
   projects/bootstrap/trunk/api/.settings/org.eclipse.jdt.core.prefs
   projects/bootstrap/trunk/api/.settings/org.maven.ide.eclipse.prefs
   projects/bootstrap/trunk/api/pom.xml
   projects/bootstrap/trunk/api/src/
   projects/bootstrap/trunk/api/src/java/
   projects/bootstrap/trunk/api/src/java/resources/
   projects/bootstrap/trunk/api/src/main/
   projects/bootstrap/trunk/api/src/main/java/
   projects/bootstrap/trunk/api/src/main/java/org/
   projects/bootstrap/trunk/api/src/main/java/org/jboss/
   projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/
   projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/
   projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/config/
   projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/config/InvalidConfigurationException.java
   projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/config/ServerConfig.java
   projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/factory/
   projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/factory/GenericFactory.java
   projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/factory/SecurityActions.java
   projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/factory/ServerConfigFactory.java
   projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/factory/ServerFactory.java
   projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/lifecycle/
   projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/lifecycle/LifecycleEventException.java
   projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/lifecycle/LifecycleEventHandler.java
   projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/lifecycle/LifecycleState.java
   projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/server/
   projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/server/Server.java
   projects/bootstrap/trunk/api/src/test/
   projects/bootstrap/trunk/api/src/test/java/
   projects/bootstrap/trunk/api/src/test/resources/
   projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/api/
   projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/api/as/
   projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/api/as/server/
   projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/api/as/server/JBossASBasedServer.java
   projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/api/as/server/JBossASServer.java
   projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/api/as/server/JBossASServerFactory.java
   projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/api/as/server/SecurityActions.java
   projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/server/JBossASBasedServerProvider.java
   projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/server/JBossASServerProvider.java
   projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/server/ServerInitializer.java
   projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/server/ServerProvider.java
Removed:
   projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/server/JBossASBasedServer.java
   projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/server/JBossASServer.java
   projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/server/JBossASServerFactory.java
   projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/server/SecurityActions.java
   projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/config/InvalidConfigurationException.java
   projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/config/ServerConfig.java
   projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/factory/
   projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/lifecycle/
   projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/server/Server.java
   projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/server/ServerInitializer.java
Modified:
   projects/bootstrap/trunk/impl-as/pom.xml
   projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/server/AbstractJBossASServerBase.java
   projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/server/JBossASServerImpl.java
   projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/server/JBossASServerInitializer.java
   projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/server/JBossASServerInitializationTestCase.java
   projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/server/JBossASServerOperationsTestCase.java
   projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/server/JBossASServerVersionInformationTestCase.java
   projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/server/KernelEventsTestCase.java
   projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/server/NoOpJBossASServer.java
   projects/bootstrap/trunk/impl-base/src/main/java/org/jboss/bootstrap/impl/base/config/AbstractBasicConfigurationInitializer.java
   projects/bootstrap/trunk/impl-base/src/main/java/org/jboss/bootstrap/impl/base/config/AbstractBasicConfigurationValidator.java
   projects/bootstrap/trunk/impl-base/src/main/java/org/jboss/bootstrap/impl/base/config/AbstractBasicServerConfig.java
   projects/bootstrap/trunk/impl-base/src/main/java/org/jboss/bootstrap/impl/base/server/AbstractBasicServerInitializer.java
   projects/bootstrap/trunk/impl-base/src/main/java/org/jboss/bootstrap/impl/base/server/AbstractServer.java
   projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/config/Counter.java
   projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/config/CountingConfigurationValidator.java
   projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/config/TestConfigurationValidator.java
   projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/config/TestServerConfig.java
   projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/config/unit/ConfigInitializationTestCase.java
   projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/config/unit/ConfigValidationTestCase.java
   projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/InterruptibleStartupServer.java
   projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/LifecycleStateChangeCapturingEventHander.java
   projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/LifecycleStateTracker.java
   projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/LifecycleStateUpdatingEventHander.java
   projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/TestExceptionOnStartServer.java
   projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/TestNoOpServer.java
   projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/unit/JmxNotificationsTestCase.java
   projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/unit/ServerConcurrentStartShutdownTestCase.java
   projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/unit/ServerInitializationTestCase.java
   projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/unit/ServerLifecycleEventCallbackTestCase.java
   projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/unit/ServerLifecycleTestCase.java
   projects/bootstrap/trunk/impl-mc/pom.xml
   projects/bootstrap/trunk/impl-mc/src/main/java/org/jboss/bootstrap/impl/mc/server/AbstractMCServerBase.java
   projects/bootstrap/trunk/pom.xml
   projects/bootstrap/trunk/spi-as/pom.xml
   projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/JBossASBootstrap.java
   projects/bootstrap/trunk/spi-mc/src/main/java/org/jboss/bootstrap/spi/mc/server/MCBasedServer.java
   projects/bootstrap/trunk/spi/pom.xml
   projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/Bootstrap.java
   projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/config/ConfigurationInitializer.java
   projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/config/ConfigurationValidator.java
   projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/metadata/BootstrapMetaData.java
Log:
[JBBOOT-102] Separate "spi" to consume a new component, "api" as the client view


Property changes on: projects/bootstrap/trunk/api
___________________________________________________________________
Name: svn:ignore
   + target
eclipse-target
bin


Added: projects/bootstrap/trunk/api/.classpath
===================================================================
--- projects/bootstrap/trunk/api/.classpath	                        (rev 0)
+++ projects/bootstrap/trunk/api/.classpath	2009-07-30 18:56:05 UTC (rev 91840)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" output="target/classes" path="src/main/java"/>
+	<classpathentry kind="src" output="target/tests-classes" path="src/test/java"/>
+	<classpathentry excluding="**" kind="src" output="target/tests-classes" path="src/test/resources"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+	<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>

Added: projects/bootstrap/trunk/api/.project
===================================================================
--- projects/bootstrap/trunk/api/.project	                        (rev 0)
+++ projects/bootstrap/trunk/api/.project	2009-07-30 18:56:05 UTC (rev 91840)
@@ -0,0 +1,17 @@
+<projectDescription>
+  <name>jboss-bootstrap-api</name>
+  <comment>Application Provider Interface to Server Implementations of JBoss Bootstrap</comment>
+  <projects/>
+  <buildSpec>
+    <buildCommand>
+      <name>org.eclipse.jdt.core.javabuilder</name>
+    </buildCommand>
+    <buildCommand>
+      <name>org.maven.ide.eclipse.maven2Builder</name>
+    </buildCommand>
+  </buildSpec>
+  <natures>
+    <nature>org.eclipse.jdt.core.javanature</nature>
+    <nature>org.maven.ide.eclipse.maven2Nature</nature>
+  </natures>
+</projectDescription>
\ No newline at end of file

Added: projects/bootstrap/trunk/api/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- projects/bootstrap/trunk/api/.settings/org.eclipse.jdt.core.prefs	                        (rev 0)
+++ projects/bootstrap/trunk/api/.settings/org.eclipse.jdt.core.prefs	2009-07-30 18:56:05 UTC (rev 91840)
@@ -0,0 +1,5 @@
+#Thu Jul 30 13:15:10 GMT-05:00 2009
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5

Added: projects/bootstrap/trunk/api/.settings/org.maven.ide.eclipse.prefs
===================================================================
--- projects/bootstrap/trunk/api/.settings/org.maven.ide.eclipse.prefs	                        (rev 0)
+++ projects/bootstrap/trunk/api/.settings/org.maven.ide.eclipse.prefs	2009-07-30 18:56:05 UTC (rev 91840)
@@ -0,0 +1,9 @@
+#Thu Jul 30 13:15:53 GMT-05:00 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1

Added: projects/bootstrap/trunk/api/pom.xml
===================================================================
--- projects/bootstrap/trunk/api/pom.xml	                        (rev 0)
+++ projects/bootstrap/trunk/api/pom.xml	2009-07-30 18:56:05 UTC (rev 91840)
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+  <!--
+  vi:ts=2:sw=2:expandtab:
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+  <!-- Parent -->
+  <parent>
+    <groupId>org.jboss.bootstrap</groupId>
+    <artifactId>jboss-bootstrap-build</artifactId>
+    <version>2.0.0-alpha-1</version>
+    <relativePath>../build/pom.xml</relativePath>
+  </parent>
+
+  <!-- Model Version -->
+  <modelVersion>4.0.0</modelVersion>
+
+  <!-- Artifact Configuration -->
+  <artifactId>jboss-bootstrap-api</artifactId>
+  <name>JBoss Bootstrap API</name>
+  <version>2.0.0-SNAPSHOT</version>
+  <description>Application Provider Interface to Server Implementations of JBoss Bootstrap</description>
+
+
+  <!-- Properties -->
+  <properties>
+
+
+  </properties>
+
+  <!-- Build -->
+  <build>
+
+  </build>
+
+  <!-- Dependencies -->
+  <dependencies>
+
+    <!-- Compilation Test Case -->
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+    </dependency>
+
+  </dependencies>
+</project>

Copied: projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/config/InvalidConfigurationException.java (from rev 91833, projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/config/InvalidConfigurationException.java)
===================================================================
--- projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/config/InvalidConfigurationException.java	                        (rev 0)
+++ projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/config/InvalidConfigurationException.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -0,0 +1,75 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.bootstrap.api.config;
+
+/**
+ * InvalidConfigurationException
+ * 
+ * Indicates that a particular configuration is not 
+ * valid for a Server
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class InvalidConfigurationException extends Exception
+{
+
+   /**
+    * 
+    */
+   private static final long serialVersionUID = 1L;
+
+   /**
+    * 
+    */
+   public InvalidConfigurationException()
+   {
+      super();
+   }
+
+   /**
+    * @param message
+    * @param cause
+    */
+   public InvalidConfigurationException(String message, Throwable cause)
+   {
+      super(message, cause);
+   }
+
+   /**
+    * @param message
+    */
+   public InvalidConfigurationException(String message)
+   {
+      super(message);
+   }
+
+   /**
+    * @param cause
+    */
+   public InvalidConfigurationException(Throwable cause)
+   {
+      super(cause);
+   }
+
+}

Copied: projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/config/ServerConfig.java (from rev 91833, projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/config/ServerConfig.java)
===================================================================
--- projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/config/ServerConfig.java	                        (rev 0)
+++ projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/config/ServerConfig.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -0,0 +1,211 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.bootstrap.api.config;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Map;
+import java.util.Properties;
+
+/**
+ * ServerConfig
+ * 
+ * Configuration used in Server creation and initialization.  After the 
+ * server has been initialized, configurations become frozen and immutable.
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface ServerConfig<T extends ServerConfig<?>>
+{
+   //-------------------------------------------------------------------------------------||
+   // Constants --------------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Property denoting the URL pointing to the home of 
+    * the bootstrap (from which other properties may be defaulted)
+    */
+   String PROP_KEY_BOOTSTRAP_HOME_URL = "jboss.bootstrap.home.url";
+
+   /**
+    * Property denoting the name of the bootstrap configuration
+    */
+   String PROP_KEY_BOOTSTRAP_NAME = "jboss.bootstrap.name";
+
+   /**
+    * Property denoting the URL of the bootstrap configuration 
+    */
+   String PROP_KEY_BOOTSTRAP_URL = "jboss.bootstrap.url";
+
+   //-------------------------------------------------------------------------------------||
+   // Contracts --------------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Obtains the location of the bootstrap directory.  Corresponds to 
+    * {@link ServerConfig#PROP_KEY_BOOTSTRAP_HOME_URL}.
+    * 
+    * @return
+    */
+   URL getBootstrapHome();
+
+   /**
+    * Sets the location of the bootstrap directory.  Corresponds to 
+    * {@link ServerConfig#PROP_KEY_BOOTSTRAP_HOME_URL}.
+    * 
+    * @param bootstrapHome
+    * @return This configuration
+    * @throws IllegalArgumentException If the bootstrap home location was not specified
+    * @throws IllegalStateException If the configuration has been frozen
+    */
+   T bootstrapHome(URL bootstrapHome) throws IllegalArgumentException, IllegalStateException;
+
+   /**
+    * Sets the location of the bootstrap directory.  Corresponds to 
+    * {@link ServerConfig#PROP_KEY_BOOTSTRAP_HOME_URL}.
+    * 
+    * @param bootstrapHome
+    * @return This configuration
+    * @throws IllegalArgumentException If the bootstrap home location was not specified, 
+    *       or could not be assigned to a URL (ie. {@link MalformedURLException}
+    * @throws IllegalStateException If the configuration has been frozen
+    */
+   T bootstrapHome(String bootstrapHome) throws IllegalArgumentException, IllegalStateException;
+
+   /**
+    * Obtains the location of the bootstrap file.  Corresponds to 
+    * {@link ServerConfig#PROP_KEY_BOOTSTRAP_URL}.
+    * 
+    * @return
+    */
+   URL getBootstrapUrl();
+
+   /**
+    * Sets the location of the bootstrap file.  Corresponds to 
+    * {@link ServerConfig#PROP_KEY_BOOTSTRAP_URL}.
+    * 
+    * @param bootstrapLocation
+    * @return This configuration
+    * @throws IllegalArgumentException If the location was not specified
+    * @throws IllegalStateException If the configuration has been frozen
+    */
+   T bootstrapUrl(URL bootstrapLocation) throws IllegalArgumentException, IllegalStateException;
+
+   /**
+    * Sets the location of the bootstrap file.  Corresponds to 
+    * {@link ServerConfig#PROP_KEY_BOOTSTRAP_URL}.
+    * 
+    * @param bootstrapUrl
+    * @return This configuration
+    * @throws IllegalArgumentException If the bootstrap URL location was not specified, 
+    *       or could not be assigned to a URL (ie. {@link MalformedURLException}
+    * @throws IllegalStateException If the configuration has been frozen
+    */
+   T bootstrapUrl(String bootstrapUrl) throws IllegalArgumentException, IllegalStateException;
+
+   /**
+    * Obtains the name of the bootstrap configuration.  Corresponds to 
+    * {@link ServerConfig#PROP_KEY_BOOTSTRAP_NAME}.
+    * 
+    * @return
+    */
+   String getBootstrapName();
+
+   /**
+    * Sets the name of the bootstrap configuration file.  Corresponds to 
+    * {@link ServerConfig#PROP_KEY_BOOTSTRAP_NAME}.
+    * 
+    * @param name
+    * @return This configuration
+    * @throws IllegalArgumentException If the name was not specified
+    * @throws IllegalStateException If the configuration has been frozen
+    */
+   T bootstrapName(String name) throws IllegalArgumentException, IllegalStateException;
+
+   /**
+    * Returns an immutable copy of the properties used in configuring the server
+    * 
+    * @return
+    */
+   Map<String, String> getProperties();
+
+   /**
+    * Returns the configuration property for the specified key, 
+    * or null if not present 
+    * 
+    * @return
+    * @param key The key
+    * @throws IllegalArgumentException If the key was not specified
+    */
+   String getProperty(String key) throws IllegalArgumentException;
+
+   /**
+    * Sets the property with the specified key to the specified value
+    * 
+    * @param key
+    * @param value
+    * @return This configuration
+    * @throws IllegalArgumentException If the key was not supplied
+    * @throws IllegalStateException If the configuration has been frozen
+    */
+   T property(String key, String value) throws IllegalArgumentException, IllegalStateException;
+
+   /**
+    * Sets the specified properties upon the configuration
+    * 
+    * @param properties
+    * @return
+    * @throws IllegalArgumentException If the properties are null
+    * @throws IllegalStateException If the configuration has been frozen
+    */
+   T properties(Map<String, String> properties) throws IllegalArgumentException, IllegalStateException;
+
+   /**
+    * Sets the specified properties upon the configuration.  For true type safety, 
+    * it is recommended to use {@link ServerConfig#properties(Map)} instead.  This
+    * is provided for compatibility with {@link System#getProperties()}.
+    * 
+    * @param properties
+    * @return
+    * @throws IllegalArgumentException If the properties are null, or if any of the 
+    *   properties are not String/String pairs.
+    * @throws IllegalStateException If the configuration has been frozen
+    */
+   T properties(Properties properties) throws IllegalArgumentException, IllegalStateException;
+
+   /**
+    * Freezes the configuration, marking it as immutable.  Will typically 
+    * be invoked by a server during the start lifecycle.  
+    * 
+    * @throws IllegalStateException
+    */
+   void freeze() throws IllegalStateException;
+
+   /**
+    * Returns whether or not this configuration is frozen and immutable
+    * 
+    * @return
+    */
+   boolean isFrozen();
+}

Copied: projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/factory/GenericFactory.java (from rev 91833, projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/factory/GenericFactory.java)
===================================================================
--- projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/factory/GenericFactory.java	                        (rev 0)
+++ projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/factory/GenericFactory.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -0,0 +1,114 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.bootstrap.api.factory;
+
+/**
+ * GenericFactory
+ * 
+ * Factory for creating generic instances
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+class GenericFactory
+{
+   //-------------------------------------------------------------------------------------||
+   // Constructor ------------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Constructor 
+    */
+   private GenericFactory()
+   {
+      // No external creation of instances
+   }
+
+   //-------------------------------------------------------------------------------------||
+   // Functional Methods -----------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Creates a instance from the specified implementation class name, using the
+    * specified ClassLoader.  The returned instance will additionally be created using
+    * the ClassLoader denoted. 
+    * 
+    * @param <T> The expected type
+    * @param implClassName The fully-qualified name of the implementation class
+    * @param cl The ClassLoader to use
+    * @param expectedType The Class to which the resultant object should be assignable 
+    * @return The newly-created instance
+    * @throws IllegalArgumentException If the expected type is null,
+    *       ClassLoader is null, implementation class 
+    *       name is null, blank, can not be found on the ClassLoader, 
+    *       or is not assignable to the expected type.
+    * @throws Exception If some error occurred in constructing the instance
+    */
+   final static <T> T createInstance(final String implClassName, final ClassLoader cl, final Class<T> expectedType)
+         throws IllegalArgumentException, Exception
+   {
+      // Precondition checks
+      if (implClassName == null || implClassName.length() == 0)
+      {
+         throw new IllegalArgumentException("Implementation class must be specified");
+      }
+      if (cl == null)
+      {
+         throw new IllegalArgumentException(ClassLoader.class.getSimpleName() + " must be specified");
+      }
+      if (expectedType == null)
+      {
+         throw new IllegalArgumentException("Expected type must be specified");
+      }
+
+      // Get the implementation class
+      Class<?> implClass = null;
+      try
+      {
+         implClass = Class.forName(implClassName, false, cl);
+      }
+      catch (ClassNotFoundException cnfe)
+      {
+         throw new IllegalArgumentException("Specified implementation class could not be found: " + implClassName
+               + " on " + ClassLoader.class.getSimpleName() + " " + cl, cnfe);
+      }
+
+      // Make a new instance
+      final Object obj = SecurityActions.newInstance(implClass, cl);
+
+      // Return
+      try
+      {
+         return expectedType.cast(obj);
+      }
+      catch (ClassCastException cce)
+      {
+         // Rethrow as new CCE with some context
+         final ClassLoader implCl = implClass.getClassLoader();
+         final ClassLoader expectedTypeCl = expectedType.getClassLoader();
+         throw new ClassCastException("Specified implementation class, " + implClassName + ", resolved to " + implClass
+               + " on " + implCl + " is not of type " + expectedType + " from " + ClassLoader.class.getSimpleName()
+               + ": " + (expectedTypeCl == null ? "[BOOTSTRAP CL]" : expectedTypeCl));
+      }
+   }
+}

Copied: projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/factory/SecurityActions.java (from rev 91833, projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/factory/SecurityActions.java)
===================================================================
--- projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/factory/SecurityActions.java	                        (rev 0)
+++ projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/factory/SecurityActions.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -0,0 +1,125 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.bootstrap.api.factory;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
+
+/**
+ * SecurityActions
+ * 
+ * Utility class for security actions, so as to provide
+ * some centralization without leaking privileged actions
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+class SecurityActions
+{
+
+   //-------------------------------------------------------------------------------------||
+   // Constructor ------------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * In place to prevent instanciation 
+    */
+   private SecurityActions()
+   {
+   }
+
+   //-------------------------------------------------------------------------------------||
+   // Utility Methods --------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Returns a new instance of the specified class, defined in the 
+    * specified ClassLoader.  If the CL is null, the Thread Context CL
+    * will be used.
+    * 
+    * @throws IllegalArgumentException If the class was not specified
+    * @throws PrivilegedActionException 
+    */
+   static Object newInstance(final Class<?> clazz, final ClassLoader cl) throws IllegalArgumentException, Exception
+   {
+
+      // Whether to set the CL
+      final boolean setDefiningCl = cl != null;
+
+      // Make new instance
+      return AccessController.doPrivileged(new PrivilegedExceptionAction<Object>()
+      {
+
+         public Object run() throws Exception
+         {
+            // Initialize
+            Thread current = null;
+            ClassLoader oldCl = null;
+
+            // If necessary, set the TCCL
+            if (setDefiningCl)
+            {
+               current = Thread.currentThread();
+               oldCl = current.getContextClassLoader();
+               current.setContextClassLoader(cl);
+            }
+
+            try
+            {
+               // Create the instance
+               return clazz.newInstance();
+            }
+            finally
+            {
+               // Reset the TCCL if necessary
+               if (setDefiningCl)
+               {
+                  current.setContextClassLoader(oldCl);
+               }
+            }
+         }
+
+      });
+   }
+
+   /**
+    * Obtains the Thread Context ClassLoader
+    * 
+    * @return
+    */
+   static ClassLoader getTccl()
+   {
+      return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>()
+      {
+
+         public ClassLoader run()
+         {
+            // Return the TCCL
+            return Thread.currentThread().getContextClassLoader();
+         }
+
+      });
+   }
+}

Copied: projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/factory/ServerConfigFactory.java (from rev 91833, projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/factory/ServerConfigFactory.java)
===================================================================
--- projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/factory/ServerConfigFactory.java	                        (rev 0)
+++ projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/factory/ServerConfigFactory.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -0,0 +1,86 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.bootstrap.api.factory;
+
+import org.jboss.bootstrap.api.config.ServerConfig;
+
+/**
+ * ServerConfigFactory
+ * 
+ * Factory of generic {@link ServerConfig} implementations
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class ServerConfigFactory
+{
+
+   //-------------------------------------------------------------------------------------||
+   // Constructor ------------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   private ServerConfigFactory()
+   {
+      // No external access
+   }
+
+   //-------------------------------------------------------------------------------------||
+   // Factory Methods --------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Creates a ServerConfig from the specified implementation class name, using the
+    * Thread Context ClassLoader.  The returned config will additionally be created using
+    * the TCCL.
+    * 
+    * @param implClassName The fully-qualified name of the implementation class
+    * @throws IllegalArgumentException If the implementation class name is null, blank, 
+    *       can not be found on the ClassLoader, or is not assignable to {@link ServerConfig} 
+    * @throws Exception If some error occurred in constructing the config
+    * @return The newly-created config
+    */
+   public static ServerConfig<?> createServerConfig(final String implClassName) throws IllegalArgumentException,
+         Exception
+   {
+      return createServerConfig(implClassName, SecurityActions.getTccl());
+   }
+
+   /**
+    * Creates a ServerConfig from the specified implementation class name, using the
+    * specified ClassLoader.  The returned config will additionally be created using
+    * the ClassLoader denoted. 
+    * 
+    * @param implClassName The fully-qualified name of the implementation class
+    * @param cl The ClassLoader to use
+    * @throws IllegalArgumentException If the ClassLoader is null, implementation class 
+    *       name is null, blank, can not be found on the ClassLoader, 
+    *       or is not assignable to {@link ServerConfig}.
+    * @throws Exception If some error occurred in constructing the config
+    * @return The newly-created config
+    */
+   public static ServerConfig<?> createServerConfig(final String implClassName, final ClassLoader cl)
+         throws IllegalArgumentException, Exception
+   {
+      return GenericFactory.createInstance(implClassName, cl, ServerConfig.class);
+   }
+}

Copied: projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/factory/ServerFactory.java (from rev 91833, projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/factory/ServerFactory.java)
===================================================================
--- projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/factory/ServerFactory.java	                        (rev 0)
+++ projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/factory/ServerFactory.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -0,0 +1,85 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.bootstrap.api.factory;
+
+import org.jboss.bootstrap.api.server.Server;
+
+/**
+ * ServerFactory
+ * 
+ * Factory of generic {@link Server} implementations
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class ServerFactory
+{
+
+   //-------------------------------------------------------------------------------------||
+   // Constructor ------------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   private ServerFactory()
+   {
+      // No external access
+   }
+
+   //-------------------------------------------------------------------------------------||
+   // Factory Methods --------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Creates a Server from the specified implementation class name, using the
+    * Thread Context ClassLoader.  The returned server will additionally be created using
+    * the TCCL.
+    * 
+    * @param implClassName The fully-qualified name of the implementation class
+    * @throws IllegalArgumentException If the implementation class name is null, blank, 
+    *       can not be found on the ClassLoader, or is not assignable to {@link Server} 
+    * @throws Exception If some error occurred in constructing the Server
+    * @return The newly-created Server
+    */
+   public static Server<?, ?> createServer(final String implClassName) throws IllegalArgumentException, Exception
+   {
+      return createServer(implClassName, SecurityActions.getTccl());
+   }
+
+   /**
+    * Creates a Server from the specified implementation class name, using the
+    * specified ClassLoader.  The returned server will additionally be created using
+    * the ClassLoader denoted. 
+    * 
+    * @param implClassName The fully-qualified name of the implementation class
+    * @param cl The ClassLoader to use
+    * @throws IllegalArgumentException If the ClassLoader is null, implementation class 
+    *       name is null, blank, can not be found on the ClassLoader, 
+    *       or is not assignable to {@link Server}.
+    * @throws Exception If some error occurred in constructing the Server
+    * @return The newly-created Server
+    */
+   public static Server<?, ?> createServer(final String implClassName, final ClassLoader cl)
+         throws IllegalArgumentException, Exception
+   {
+      return GenericFactory.createInstance(implClassName, cl, Server.class);
+   }
+}

Copied: projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/lifecycle/LifecycleEventException.java (from rev 91833, projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/lifecycle/LifecycleEventException.java)
===================================================================
--- projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/lifecycle/LifecycleEventException.java	                        (rev 0)
+++ projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/lifecycle/LifecycleEventException.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -0,0 +1,80 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.bootstrap.api.lifecycle;
+
+/**
+ * LifecycleEventException
+ *
+ * Thrown by a lifecycle event handler if an error was encountered
+ * in processing
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class LifecycleEventException extends Exception
+{
+
+   //-------------------------------------------------------------------------------------||
+   // Class Members ----------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   private static final long serialVersionUID = 1L;
+
+   //-------------------------------------------------------------------------------------||
+   // Constructors -----------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * 
+    */
+   public LifecycleEventException()
+   {
+      super();
+   }
+
+   /**
+    * @param message
+    * @param cause
+    */
+   public LifecycleEventException(String message, Throwable cause)
+   {
+      super(message, cause);
+   }
+
+   /**
+    * @param message
+    */
+   public LifecycleEventException(String message)
+   {
+      super(message);
+   }
+
+   /**
+    * @param cause
+    */
+   public LifecycleEventException(Throwable cause)
+   {
+      super(cause);
+   }
+
+}

Copied: projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/lifecycle/LifecycleEventHandler.java (from rev 91833, projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/lifecycle/LifecycleEventHandler.java)
===================================================================
--- projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/lifecycle/LifecycleEventHandler.java	                        (rev 0)
+++ projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/lifecycle/LifecycleEventHandler.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.bootstrap.api.lifecycle;
+
+/**
+ * LifecycleEventHandler
+ * 
+ * A callback to handle some lifecycle state change.  Registered
+ * with the server, and fired immediately after the state change has
+ * taken place.
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface LifecycleEventHandler
+{
+   //-------------------------------------------------------------------------------------||
+   // Contracts --------------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Fired upon the event change with which it was registered to handle
+    * 
+    * @param server The server 
+    * @param state The new state
+    * @throws LifecycleEventException If an error was encounterd in processing
+    */
+   void handleEvent(LifecycleState state) throws LifecycleEventException;
+}

Copied: projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/lifecycle/LifecycleState.java (from rev 91833, projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/lifecycle/LifecycleState.java)
===================================================================
--- projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/lifecycle/LifecycleState.java	                        (rev 0)
+++ projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/lifecycle/LifecycleState.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.bootstrap.api.lifecycle;
+
+/**
+ * LifecycleState
+ *
+ * Describes current state of the Server lifecycle
+ * 
+ * INSTANCIATED == Instanciated, the initial state of new servers.  Never re-enters this state 
+ *   (so lifecycle event callbacks will never be made here)
+ * PRE_INIT == Just prior to initialization, open to configuration, mutable operations permitted.
+ *   In this state no more than once.  
+ * INITIALIZED == Initialization completed, mutable operations frozen.  In this state
+ *   no more than once.
+ * IDLE == Not yet started, or has previously stopped.  Awaiting start.
+ * STARTING == In start lifecycle
+ * STARTED == Fully started, in service
+ * STOPPING == In stop lifecycle
+ * STOPPED == Transition state to denote fully stopped before returning to IDLE
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public enum LifecycleState {
+
+   /*
+    * Lifecycle States for Servers
+    */
+
+   INSTANCIATED, PRE_INIT, INITIALIZED, IDLE, STARTING, STARTED, STOPPING, STOPPED
+}

Copied: projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/server/Server.java (from rev 91834, projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/server/Server.java)
===================================================================
--- projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/server/Server.java	                        (rev 0)
+++ projects/bootstrap/trunk/api/src/main/java/org/jboss/bootstrap/api/server/Server.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -0,0 +1,182 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.bootstrap.api.server;
+
+import java.util.EnumSet;
+
+import org.jboss.bootstrap.api.config.InvalidConfigurationException;
+import org.jboss.bootstrap.api.config.ServerConfig;
+import org.jboss.bootstrap.api.lifecycle.LifecycleEventException;
+import org.jboss.bootstrap.api.lifecycle.LifecycleEventHandler;
+import org.jboss.bootstrap.api.lifecycle.LifecycleState;
+
+/**
+ * Server
+ * 
+ * Client view of generic Server implementations
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface Server<K extends Server<K, T>, T extends ServerConfig<T>>
+{
+   //-------------------------------------------------------------------------------------||
+   // Constants --------------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /** 
+    * The JMX notification event type sent on end of server startup 
+    */
+   public final String START_NOTIFICATION_TYPE = "org.jboss.system.server.started";
+
+   /** 
+    * The JMX notification event type sent on begin of the server shutdown  
+    */
+   public final String STOP_NOTIFICATION_TYPE = "org.jboss.system.server.stopped";
+
+   //-------------------------------------------------------------------------------------||
+   // Contracts --------------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Prepares the server for startup.  If {@link Server#getServerInitializer()} is not 
+    * null, will invoke {@link ServerInitializer#initialize(Server)}.
+    * Freezes the configuration from further 
+    * mutable actions by invoking {@link ServerConfig#freeze()}.  Finally
+    * sets the current state to {@link LifecycleState#IDLE}
+    * 
+    * @throws IllegalStateException  If the server is not in state {@link LifecycleState#PRE_INIT}, 
+    *       or if the configuration has not been defined
+    * @throws InvalidConfigurationException
+    * @throws LifecycleEventException If an error was encountered in the lifecycle handlers for this event
+    */
+   void initialize() throws IllegalStateException, InvalidConfigurationException, LifecycleEventException;
+
+   /**
+    * Start lifecycle of the Server, optionally invoking upon
+    * {@link Server#initialize()} if the state is {@link LifecycleState#PRE_INIT}.
+    * During execution the state will be {@link LifecycleState#STARTING}, and upon
+    * successful completion will be {@link LifecycleState#STARTED}. 
+    * 
+    * @throws IllegalStateException If the Server is already started or starting
+    * @throws Exception
+    */
+   void start() throws IllegalStateException, Exception;
+
+   /**
+    * Stop lifecycle of the Server.  During execution the state will be 
+    * {@link LifecycleState#STOPPING}, and upon
+    * successful completion will be {@link LifecycleState#IDLE}.  If a 
+    * server initialzer is defined then {@link ServerInitializer#cleanup(Server)}
+    * will be invoked during this call.
+    * 
+    * @throws IllegalStateException If the Server is not started
+    * @throws Exception
+    */
+   void stop() throws IllegalStateException, Exception;
+
+   /**
+    * Alias for {@link Server#stop()}
+    * 
+    * @throws IllegalStateException If the Server is not started
+    * @throws Exception
+    */
+   void shutdown() throws IllegalStateException, Exception;
+
+   /**
+    * Returns the current state of the Server lifecycle
+    * 
+    * @return The {@link LifecycleState}
+    */
+   LifecycleState getState();
+
+   /**
+    * Registers the specified handler to fire when 
+    * the server's state enters that of the specified state.
+    * 
+    * @param state
+    * @param handler
+    * @throws IllegalArgumentException If either the state or the handler are unspecified
+    */
+   void registerEventHandler(LifecycleState state, LifecycleEventHandler handler) throws IllegalArgumentException;
+
+   /**
+    * Registers the specified handler to fire when 
+    * the server's state enters one of the the specified states
+    * 
+    * @param handler
+    * @param states
+    * @throws IllegalArgumentException If either the states or the handler are unspecified
+    */
+   void registerEventHandler(LifecycleEventHandler handler, EnumSet<LifecycleState> states)
+         throws IllegalArgumentException;
+
+   /**
+    * Registers the specified handler to fire when 
+    * the server's state enters one of the the specified states
+    * 
+    * @param handler
+    * @param states
+    * @throws IllegalArgumentException If either the states or the handler are unspecified
+    */
+   void registerEventHandler(LifecycleEventHandler handler, LifecycleState... states) throws IllegalArgumentException;
+
+   /**
+    * Registers the specified handlers to fire when 
+    * the server's state enters that of the specified state.
+    * 
+    * @param state
+    * @param handlers
+    * @throws IllegalArgumentException If either the state or the handlers are unspecified
+    */
+   void registerEventHandlers(LifecycleState state, LifecycleEventHandler... handlers) throws IllegalArgumentException;
+
+   /**
+    * Unregisters the specified event handler from firing 
+    * when the server state changes to the specified state.
+    * 
+    * @param state
+    * @param handler
+    * @return Whether or not the handler was removed (ie. false if not registered)
+    * @throws IllegalArgumentException If either the state or handler are unspecified
+    */
+   boolean unregisterEventHandler(LifecycleEventHandler handler, LifecycleState state) throws IllegalArgumentException;
+
+   /**
+    * Returns the underlying server configuration.  If
+    * the server state is anything aside from 
+    * {@link LifecycleState#PRE_INIT}, the configuration 
+    * will be immutable / frozen.
+    * 
+    * @return
+    */
+   T getConfiguration();
+
+   /**
+    * Sets the configuration
+    * 
+    * @param config
+    * @return This server
+    */
+   void setConfiguration(T config);
+}


Property changes on: projects/bootstrap/trunk/api-as
___________________________________________________________________
Name: svn:ignore
   + target
eclipse-target
bin


Added: projects/bootstrap/trunk/api-as/.classpath
===================================================================
--- projects/bootstrap/trunk/api-as/.classpath	                        (rev 0)
+++ projects/bootstrap/trunk/api-as/.classpath	2009-07-30 18:56:05 UTC (rev 91840)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" output="target/classes" path="src/main/java"/>
+	<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
+	<classpathentry kind="src" output="target/tests-classes" path="src/test/java"/>
+	<classpathentry excluding="**" kind="src" output="target/tests-classes" path="src/test/resources"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+	<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>

Added: projects/bootstrap/trunk/api-as/.project
===================================================================
--- projects/bootstrap/trunk/api-as/.project	                        (rev 0)
+++ projects/bootstrap/trunk/api-as/.project	2009-07-30 18:56:05 UTC (rev 91840)
@@ -0,0 +1,17 @@
+<projectDescription>
+  <name>jboss-bootstrap-spi-as</name>
+  <comment>Service Provider Interface for Application Server Implementations of JBoss Bootstrap</comment>
+  <projects/>
+  <buildSpec>
+    <buildCommand>
+      <name>org.eclipse.jdt.core.javabuilder</name>
+    </buildCommand>
+    <buildCommand>
+      <name>org.maven.ide.eclipse.maven2Builder</name>
+    </buildCommand>
+  </buildSpec>
+  <natures>
+    <nature>org.eclipse.jdt.core.javanature</nature>
+    <nature>org.maven.ide.eclipse.maven2Nature</nature>
+  </natures>
+</projectDescription>
\ No newline at end of file

Added: projects/bootstrap/trunk/api-as/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- projects/bootstrap/trunk/api-as/.settings/org.eclipse.jdt.core.prefs	                        (rev 0)
+++ projects/bootstrap/trunk/api-as/.settings/org.eclipse.jdt.core.prefs	2009-07-30 18:56:05 UTC (rev 91840)
@@ -0,0 +1,5 @@
+#Thu Jul 30 12:40:43 GMT-05:00 2009
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5

Added: projects/bootstrap/trunk/api-as/.settings/org.maven.ide.eclipse.prefs
===================================================================
--- projects/bootstrap/trunk/api-as/.settings/org.maven.ide.eclipse.prefs	                        (rev 0)
+++ projects/bootstrap/trunk/api-as/.settings/org.maven.ide.eclipse.prefs	2009-07-30 18:56:05 UTC (rev 91840)
@@ -0,0 +1,9 @@
+#Thu Jul 30 13:15:53 GMT-05:00 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1

Added: projects/bootstrap/trunk/api-as/pom.xml
===================================================================
--- projects/bootstrap/trunk/api-as/pom.xml	                        (rev 0)
+++ projects/bootstrap/trunk/api-as/pom.xml	2009-07-30 18:56:05 UTC (rev 91840)
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+  <!--
+  vi:ts=2:sw=2:expandtab:
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+  <!-- Parent -->
+  <parent>
+    <groupId>org.jboss.bootstrap</groupId>
+    <artifactId>jboss-bootstrap-build</artifactId>
+    <version>2.0.0-alpha-1</version>
+    <relativePath>../build/pom.xml</relativePath>
+  </parent>
+
+  <!-- Model Version -->
+  <modelVersion>4.0.0</modelVersion>
+
+  <!-- Artifact Configuration -->
+  <artifactId>jboss-bootstrap-api-as</artifactId>
+  <name>JBoss Bootstrap API for AS</name>
+  <version>2.0.0-SNAPSHOT</version>
+  <description>Application Provider Interface to Application Server Implementations of JBoss Bootstrap</description>
+
+
+  <!-- Properties -->
+  <properties>
+
+    <version.org.jboss.bootstrap_jboss.bootstrap.api>2.0.0-SNAPSHOT</version.org.jboss.bootstrap_jboss.bootstrap.api>
+
+  </properties>
+
+  <!-- Build -->
+  <build>
+
+  </build>
+
+  <!-- Dependencies -->
+  <dependencies>
+
+    <dependency>
+      <groupId>org.jboss.bootstrap</groupId>
+      <artifactId>jboss-bootstrap-api</artifactId>
+      <version>${version.org.jboss.bootstrap_jboss.bootstrap.api}</version>
+    </dependency>
+
+  </dependencies>
+</project>

Modified: projects/bootstrap/trunk/impl-as/pom.xml
===================================================================
--- projects/bootstrap/trunk/impl-as/pom.xml	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/impl-as/pom.xml	2009-07-30 18:56:05 UTC (rev 91840)
@@ -25,8 +25,8 @@
   <properties>
 
     <!-- Versions -->
-    <version.org.jboss.bootstrap_jboss.bootstrap.impl.mc>2.0.0-alpha-2</version.org.jboss.bootstrap_jboss.bootstrap.impl.mc>
-    <version.org.jboss.bootstrap_jboss.bootstrap.spi.as>2.0.0-alpha-3</version.org.jboss.bootstrap_jboss.bootstrap.spi.as>
+    <version.org.jboss.bootstrap_jboss.bootstrap.impl.mc>2.0.0-SNAPSHOT</version.org.jboss.bootstrap_jboss.bootstrap.impl.mc>
+    <version.org.jboss.bootstrap_jboss.bootstrap.spi.as>2.0.0-SNAPSHOT</version.org.jboss.bootstrap_jboss.bootstrap.spi.as>
     <!-- REMOVE: JBBOOT-68 -->
     <version.org.jboss_jboss.vfs>2.2.0.M4</version.org.jboss_jboss.vfs>
 

Modified: projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/server/AbstractJBossASServerBase.java
===================================================================
--- projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/server/AbstractJBossASServerBase.java	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/server/AbstractJBossASServerBase.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -28,6 +28,7 @@
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
+import org.jboss.bootstrap.api.as.server.JBossASBasedServer;
 import org.jboss.bootstrap.impl.as.config.JBossASBasedConfigurationValidator;
 import org.jboss.bootstrap.impl.as.config.JBossASConfigurationInitializerImpl;
 import org.jboss.bootstrap.impl.as.lifecycle.KernelStartEventLifecycleEventHandler;
@@ -36,7 +37,7 @@
 import org.jboss.bootstrap.impl.mc.server.AbstractMCServerBase;
 import org.jboss.bootstrap.spi.as.config.JBossASBasedServerConfig;
 import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
-import org.jboss.bootstrap.spi.as.server.JBossASBasedServer;
+import org.jboss.bootstrap.spi.as.server.JBossASBasedServerProvider;
 import org.jboss.bootstrap.spi.config.InvalidConfigurationException;
 import org.jboss.bootstrap.spi.lifecycle.LifecycleEventException;
 import org.jboss.bootstrap.spi.lifecycle.LifecycleEventHandler;
@@ -56,10 +57,10 @@
  * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
  * @version $Revision: $
  */
- at ManagementObject(name = "jboss.system:type=MCServer", isRuntime = true, properties = ManagementProperties.EXPLICIT, description = "the MCServer bootstrap view", componentType = @ManagementComponent(type = "MCBean", subtype = "*"))
+ at ManagementObject(name = AbstractJBossASServerBase.NAME_MANAGEMENT_OBJECT, isRuntime = true, properties = ManagementProperties.EXPLICIT, description = "the MCServer bootstrap view", componentType = @ManagementComponent(type = "MCBean", subtype = "*"))
 public abstract class AbstractJBossASServerBase<K extends JBossASBasedServer<K, T>, T extends JBossASBasedServerConfig<T>>
       extends
-         AbstractMCServerBase<K, T> implements JBossASBasedServer<K, T>
+         AbstractMCServerBase<K, T> implements JBossASBasedServerProvider<K, T>
 {
    //-------------------------------------------------------------------------------||
    // Class Members ----------------------------------------------------------------||
@@ -71,6 +72,11 @@
    private static final Logger log = Logger.getLogger(AbstractJBossASServerBase.class);
 
    /**
+    * The name of the @ManagementObject for this server
+    */
+   public static final String NAME_MANAGEMENT_OBJECT = "jboss.system:type=MCServer";
+
+   /**
     * Character denoting that we're referencing an environment variable or some property
     */
    private static final char CHAR_ENV_VAR = '$';

Modified: projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/server/JBossASServerImpl.java
===================================================================
--- projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/server/JBossASServerImpl.java	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/server/JBossASServerImpl.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -21,9 +21,10 @@
  */
 package org.jboss.bootstrap.impl.as.server;
 
+import org.jboss.bootstrap.api.as.server.JBossASServer;
 import org.jboss.bootstrap.impl.as.config.BasicJBossASServerConfig;
 import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
-import org.jboss.bootstrap.spi.as.server.JBossASServer;
+import org.jboss.bootstrap.spi.as.server.JBossASServerProvider;
 
 /**
  * JBossASServerImpl
@@ -35,7 +36,7 @@
  */
 public class JBossASServerImpl extends AbstractJBossASServerBase<JBossASServer, JBossASServerConfig>
       implements
-         JBossASServer
+         JBossASServerProvider
 {
    //-------------------------------------------------------------------------------------||
    // Constructors -----------------------------------------------------------------------||

Modified: projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/server/JBossASServerInitializer.java
===================================================================
--- projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/server/JBossASServerInitializer.java	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/server/JBossASServerInitializer.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -27,10 +27,10 @@
 import java.net.URISyntaxException;
 import java.net.URL;
 
+import org.jboss.bootstrap.api.as.server.JBossASBasedServer;
 import org.jboss.bootstrap.impl.base.server.AbstractBasicServerInitializer;
 import org.jboss.bootstrap.spi.as.config.JBossASBasedServerConfig;
 import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
-import org.jboss.bootstrap.spi.as.server.JBossASBasedServer;
 import org.jboss.bootstrap.spi.server.ServerInitializer;
 import org.jboss.logging.Logger;
 

Modified: projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/server/JBossASServerInitializationTestCase.java
===================================================================
--- projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/server/JBossASServerInitializationTestCase.java	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/server/JBossASServerInitializationTestCase.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -28,9 +28,9 @@
 
 import junit.framework.TestCase;
 
+import org.jboss.bootstrap.api.as.server.JBossASServer;
 import org.jboss.bootstrap.impl.as.common.TestUtils;
 import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
-import org.jboss.bootstrap.spi.as.server.JBossASServer;
 import org.jboss.logging.Logger;
 import org.junit.After;
 import org.junit.Before;

Modified: projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/server/JBossASServerOperationsTestCase.java
===================================================================
--- projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/server/JBossASServerOperationsTestCase.java	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/server/JBossASServerOperationsTestCase.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -26,9 +26,10 @@
 
 import junit.framework.TestCase;
 
+import org.jboss.bootstrap.api.as.server.JBossASServer;
 import org.jboss.bootstrap.impl.as.common.TestUtils;
 import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
-import org.jboss.bootstrap.spi.as.server.JBossASServer;
+import org.jboss.bootstrap.spi.as.server.JBossASServerProvider;
 import org.jboss.logging.Logger;
 import org.junit.After;
 import org.junit.Before;
@@ -105,16 +106,19 @@
    {
       // Log
       log.info("testIsStarted");
+      
+      // Cast to get the SPI View
+      final JBossASServerProvider serverProviderSpiView = (JBossASServerProvider)server;
 
       // Test not started
-      final boolean startedBefore = server.isStarted();
+      final boolean startedBefore = serverProviderSpiView.isStarted();
       TestCase.assertFalse("Server should not report as started before it has been", startedBefore);
 
       // Start
       server.start();
 
       // Test started
-      final boolean startedAfter = server.isStarted();
+      final boolean startedAfter = serverProviderSpiView.isStarted();
       TestCase.assertTrue("Server should report as started after start lifecycle has been called", startedAfter);
 
       // Shutdown

Modified: projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/server/JBossASServerVersionInformationTestCase.java
===================================================================
--- projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/server/JBossASServerVersionInformationTestCase.java	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/server/JBossASServerVersionInformationTestCase.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -24,7 +24,7 @@
 
 import junit.framework.TestCase;
 
-import org.jboss.bootstrap.spi.as.server.JBossASServer;
+import org.jboss.bootstrap.spi.as.server.JBossASServerProvider;
 import org.jboss.logging.Logger;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -47,9 +47,9 @@
    private static final Logger log = Logger.getLogger(JBossASServerVersionInformationTestCase.class);
 
    /**
-    * The server to test
+    * The server to test; use the SPI view, not the client view
     */
-   private static JBossASServer server;
+   private static JBossASServerProvider server;
 
    /*
     * Test expected values; these must match the contents of the test

Modified: projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/server/KernelEventsTestCase.java
===================================================================
--- projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/server/KernelEventsTestCase.java	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/server/KernelEventsTestCase.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -24,7 +24,8 @@
 
 import junit.framework.TestCase;
 
-import org.jboss.bootstrap.spi.as.server.JBossASServer;
+import org.jboss.bootstrap.api.as.server.JBossASServer;
+import org.jboss.bootstrap.spi.as.server.JBossASServerProvider;
 import org.jboss.bootstrap.spi.server.Server;
 import org.jboss.kernel.Kernel;
 import org.jboss.kernel.spi.event.KernelEvent;
@@ -57,9 +58,9 @@
    //-------------------------------------------------------------------------------------||
 
    /**
-    * The Server
+    * The Server; use the SPI view and not the client view to get at getKernel()
     */
-   private JBossASServer server;
+   private JBossASServerProvider server;
 
    /**
     * Whether or not we got the start event
@@ -83,7 +84,7 @@
    public void init() throws Throwable
    {
       // Make and set the test server
-      final JBossASServer server = new NoOpJBossASServer();
+      final JBossASServerProvider server = new NoOpJBossASServer();
       this.server = server;
 
       // Initialize

Modified: projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/server/NoOpJBossASServer.java
===================================================================
--- projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/server/NoOpJBossASServer.java	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/impl-as/src/test/java/org/jboss/bootstrap/impl/as/server/NoOpJBossASServer.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -22,7 +22,7 @@
 
 package org.jboss.bootstrap.impl.as.server;
 
-import org.jboss.bootstrap.spi.as.server.JBossASServer;
+import org.jboss.bootstrap.api.as.server.JBossASServer;
 import org.jboss.logging.Logger;
 
 /**

Modified: projects/bootstrap/trunk/impl-base/src/main/java/org/jboss/bootstrap/impl/base/config/AbstractBasicConfigurationInitializer.java
===================================================================
--- projects/bootstrap/trunk/impl-base/src/main/java/org/jboss/bootstrap/impl/base/config/AbstractBasicConfigurationInitializer.java	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/impl-base/src/main/java/org/jboss/bootstrap/impl/base/config/AbstractBasicConfigurationInitializer.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -26,9 +26,9 @@
 import java.net.URL;
 import java.util.Map;
 
+import org.jboss.bootstrap.api.config.InvalidConfigurationException;
+import org.jboss.bootstrap.api.config.ServerConfig;
 import org.jboss.bootstrap.spi.config.ConfigurationInitializer;
-import org.jboss.bootstrap.spi.config.InvalidConfigurationException;
-import org.jboss.bootstrap.spi.config.ServerConfig;
 import org.jboss.logging.Logger;
 
 /**
@@ -73,7 +73,7 @@
     * @throws InvalidConfigurationException
     * @throws IllegalArgumentException
     * @throws IllegalStateException
-    * @see org.jboss.bootstrap.spi.config.ConfigurationInitializer#initialize(org.jboss.bootstrap.spi.config.ServerConfig)
+    * @see org.jboss.bootstrap.api.config.ConfigurationInitializer#initialize(org.jboss.bootstrap.api.config.ServerConfig)
     */
    private void _initialize(T config) throws InvalidConfigurationException, IllegalArgumentException,
          IllegalStateException

Modified: projects/bootstrap/trunk/impl-base/src/main/java/org/jboss/bootstrap/impl/base/config/AbstractBasicConfigurationValidator.java
===================================================================
--- projects/bootstrap/trunk/impl-base/src/main/java/org/jboss/bootstrap/impl/base/config/AbstractBasicConfigurationValidator.java	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/impl-base/src/main/java/org/jboss/bootstrap/impl/base/config/AbstractBasicConfigurationValidator.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -24,9 +24,9 @@
 
 import java.net.URL;
 
+import org.jboss.bootstrap.api.config.InvalidConfigurationException;
+import org.jboss.bootstrap.api.config.ServerConfig;
 import org.jboss.bootstrap.spi.config.ConfigurationValidator;
-import org.jboss.bootstrap.spi.config.InvalidConfigurationException;
-import org.jboss.bootstrap.spi.config.ServerConfig;
 import org.jboss.logging.Logger;
 
 /**

Modified: projects/bootstrap/trunk/impl-base/src/main/java/org/jboss/bootstrap/impl/base/config/AbstractBasicServerConfig.java
===================================================================
--- projects/bootstrap/trunk/impl-base/src/main/java/org/jboss/bootstrap/impl/base/config/AbstractBasicServerConfig.java	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/impl-base/src/main/java/org/jboss/bootstrap/impl/base/config/AbstractBasicServerConfig.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -31,7 +31,7 @@
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 
-import org.jboss.bootstrap.spi.config.ServerConfig;
+import org.jboss.bootstrap.api.config.ServerConfig;
 import org.jboss.logging.Logger;
 
 /**

Modified: projects/bootstrap/trunk/impl-base/src/main/java/org/jboss/bootstrap/impl/base/server/AbstractBasicServerInitializer.java
===================================================================
--- projects/bootstrap/trunk/impl-base/src/main/java/org/jboss/bootstrap/impl/base/server/AbstractBasicServerInitializer.java	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/impl-base/src/main/java/org/jboss/bootstrap/impl/base/server/AbstractBasicServerInitializer.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -26,9 +26,9 @@
 import java.util.HashSet;
 import java.util.Set;
 
-import org.jboss.bootstrap.spi.config.ServerConfig;
-import org.jboss.bootstrap.spi.lifecycle.LifecycleState;
-import org.jboss.bootstrap.spi.server.Server;
+import org.jboss.bootstrap.api.config.ServerConfig;
+import org.jboss.bootstrap.api.lifecycle.LifecycleState;
+import org.jboss.bootstrap.api.server.Server;
 import org.jboss.bootstrap.spi.server.ServerInitializer;
 import org.jboss.logging.Logger;
 

Modified: projects/bootstrap/trunk/impl-base/src/main/java/org/jboss/bootstrap/impl/base/server/AbstractServer.java
===================================================================
--- projects/bootstrap/trunk/impl-base/src/main/java/org/jboss/bootstrap/impl/base/server/AbstractServer.java	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/impl-base/src/main/java/org/jboss/bootstrap/impl/base/server/AbstractServer.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -35,15 +35,15 @@
 import javax.management.NotificationBroadcaster;
 import javax.management.NotificationBroadcasterSupport;
 
+import org.jboss.bootstrap.api.config.InvalidConfigurationException;
+import org.jboss.bootstrap.api.config.ServerConfig;
+import org.jboss.bootstrap.api.lifecycle.LifecycleEventException;
+import org.jboss.bootstrap.api.lifecycle.LifecycleEventHandler;
+import org.jboss.bootstrap.api.lifecycle.LifecycleState;
+import org.jboss.bootstrap.api.server.Server;
 import org.jboss.bootstrap.spi.Bootstrap;
 import org.jboss.bootstrap.spi.config.ConfigurationInitializer;
 import org.jboss.bootstrap.spi.config.ConfigurationValidator;
-import org.jboss.bootstrap.spi.config.InvalidConfigurationException;
-import org.jboss.bootstrap.spi.config.ServerConfig;
-import org.jboss.bootstrap.spi.lifecycle.LifecycleEventException;
-import org.jboss.bootstrap.spi.lifecycle.LifecycleEventHandler;
-import org.jboss.bootstrap.spi.lifecycle.LifecycleState;
-import org.jboss.bootstrap.spi.server.Server;
 import org.jboss.bootstrap.spi.server.ServerInitializer;
 import org.jboss.logging.Logger;
 import org.jboss.util.StopWatch;
@@ -244,7 +244,6 @@
       return state;
    }
 
-   
    /* (non-Javadoc)
     * @see org.jboss.bootstrap.spi.server.Server#stop()
     */
@@ -289,8 +288,8 @@
       synchronized (this)
       {
          // Ensure running
-         LifecycleState required = LifecycleState.STARTED;
-         LifecycleState actual = this.getState();
+         final LifecycleState required = LifecycleState.STARTED;
+         final LifecycleState actual = this.getState();
          this.checkState(required, actual);
 
          // Initiate shutdown sequence

Modified: projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/config/Counter.java
===================================================================
--- projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/config/Counter.java	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/config/Counter.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -22,8 +22,8 @@
 
 package org.jboss.bootstrap.impl.base.config;
 
+import org.jboss.bootstrap.api.config.ServerConfig;
 import org.jboss.bootstrap.spi.config.ConfigurationValidator;
-import org.jboss.bootstrap.spi.config.ServerConfig;
 
 /**
  * Counter

Modified: projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/config/CountingConfigurationValidator.java
===================================================================
--- projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/config/CountingConfigurationValidator.java	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/config/CountingConfigurationValidator.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -22,8 +22,8 @@
 
 package org.jboss.bootstrap.impl.base.config;
 
+import org.jboss.bootstrap.api.config.ServerConfig;
 import org.jboss.bootstrap.spi.config.ConfigurationValidator;
-import org.jboss.bootstrap.spi.config.ServerConfig;
 
 /**
  * CountingConfigurationValidator

Modified: projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/config/TestConfigurationValidator.java
===================================================================
--- projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/config/TestConfigurationValidator.java	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/config/TestConfigurationValidator.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -24,7 +24,7 @@
 
 import java.util.concurrent.atomic.AtomicInteger;
 
-import org.jboss.bootstrap.spi.config.InvalidConfigurationException;
+import org.jboss.bootstrap.api.config.InvalidConfigurationException;
 
 /**
  * TestConfigurationValidator

Modified: projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/config/TestServerConfig.java
===================================================================
--- projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/config/TestServerConfig.java	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/config/TestServerConfig.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -22,7 +22,7 @@
 
 package org.jboss.bootstrap.impl.base.config;
 
-import org.jboss.bootstrap.spi.config.ServerConfig;
+import org.jboss.bootstrap.api.config.ServerConfig;
 
 
 /**

Modified: projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/config/unit/ConfigInitializationTestCase.java
===================================================================
--- projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/config/unit/ConfigInitializationTestCase.java	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/config/unit/ConfigInitializationTestCase.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -26,11 +26,11 @@
 
 import junit.framework.TestCase;
 
+import org.jboss.bootstrap.api.config.ServerConfig;
 import org.jboss.bootstrap.impl.base.config.TestConfigFactory;
 import org.jboss.bootstrap.impl.base.config.TestConfigurationInitializer;
 import org.jboss.bootstrap.impl.base.config.TestServerConfig;
 import org.jboss.bootstrap.spi.config.ConfigurationInitializer;
-import org.jboss.bootstrap.spi.config.ServerConfig;
 import org.jboss.logging.Logger;
 import org.junit.BeforeClass;
 import org.junit.Test;

Modified: projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/config/unit/ConfigValidationTestCase.java
===================================================================
--- projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/config/unit/ConfigValidationTestCase.java	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/config/unit/ConfigValidationTestCase.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -24,11 +24,11 @@
 
 import junit.framework.TestCase;
 
+import org.jboss.bootstrap.api.config.InvalidConfigurationException;
 import org.jboss.bootstrap.impl.base.config.TestConfigFactory;
 import org.jboss.bootstrap.impl.base.config.TestConfigurationValidator;
 import org.jboss.bootstrap.impl.base.config.TestServerConfig;
 import org.jboss.bootstrap.spi.config.ConfigurationValidator;
-import org.jboss.bootstrap.spi.config.InvalidConfigurationException;
 import org.jboss.logging.Logger;
 import org.junit.BeforeClass;
 import org.junit.Test;

Modified: projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/InterruptibleStartupServer.java
===================================================================
--- projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/InterruptibleStartupServer.java	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/InterruptibleStartupServer.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -24,8 +24,8 @@
 
 import java.util.concurrent.CyclicBarrier;
 
+import org.jboss.bootstrap.api.server.Server;
 import org.jboss.bootstrap.impl.base.config.TestServerConfig;
-import org.jboss.bootstrap.spi.server.Server;
 import org.jboss.logging.Logger;
 
 /**

Modified: projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/LifecycleStateChangeCapturingEventHander.java
===================================================================
--- projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/LifecycleStateChangeCapturingEventHander.java	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/LifecycleStateChangeCapturingEventHander.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -26,9 +26,9 @@
 import java.util.Collections;
 import java.util.List;
 
-import org.jboss.bootstrap.spi.lifecycle.LifecycleEventException;
-import org.jboss.bootstrap.spi.lifecycle.LifecycleEventHandler;
-import org.jboss.bootstrap.spi.lifecycle.LifecycleState;
+import org.jboss.bootstrap.api.lifecycle.LifecycleEventException;
+import org.jboss.bootstrap.api.lifecycle.LifecycleEventHandler;
+import org.jboss.bootstrap.api.lifecycle.LifecycleState;
 import org.jboss.logging.Logger;
 
 /**

Modified: projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/LifecycleStateTracker.java
===================================================================
--- projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/LifecycleStateTracker.java	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/LifecycleStateTracker.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -22,7 +22,7 @@
 
 package org.jboss.bootstrap.impl.base.server;
 
-import org.jboss.bootstrap.spi.lifecycle.LifecycleState;
+import org.jboss.bootstrap.api.lifecycle.LifecycleState;
 
 /**
  * LifecycleStateTracker

Modified: projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/LifecycleStateUpdatingEventHander.java
===================================================================
--- projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/LifecycleStateUpdatingEventHander.java	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/LifecycleStateUpdatingEventHander.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -22,9 +22,9 @@
 
 package org.jboss.bootstrap.impl.base.server;
 
-import org.jboss.bootstrap.spi.lifecycle.LifecycleEventException;
-import org.jboss.bootstrap.spi.lifecycle.LifecycleEventHandler;
-import org.jboss.bootstrap.spi.lifecycle.LifecycleState;
+import org.jboss.bootstrap.api.lifecycle.LifecycleEventException;
+import org.jboss.bootstrap.api.lifecycle.LifecycleEventHandler;
+import org.jboss.bootstrap.api.lifecycle.LifecycleState;
 import org.jboss.logging.Logger;
 
 /**

Modified: projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/TestExceptionOnStartServer.java
===================================================================
--- projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/TestExceptionOnStartServer.java	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/TestExceptionOnStartServer.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -22,8 +22,8 @@
 
 package org.jboss.bootstrap.impl.base.server;
 
+import org.jboss.bootstrap.api.server.Server;
 import org.jboss.bootstrap.impl.base.config.TestServerConfig;
-import org.jboss.bootstrap.spi.server.Server;
 import org.jboss.logging.Logger;
 
 /**

Modified: projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/TestNoOpServer.java
===================================================================
--- projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/TestNoOpServer.java	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/TestNoOpServer.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -22,8 +22,8 @@
 
 package org.jboss.bootstrap.impl.base.server;
 
+import org.jboss.bootstrap.api.server.Server;
 import org.jboss.bootstrap.impl.base.config.TestServerConfig;
-import org.jboss.bootstrap.spi.server.Server;
 import org.jboss.logging.Logger;
 
 /**

Modified: projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/unit/JmxNotificationsTestCase.java
===================================================================
--- projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/unit/JmxNotificationsTestCase.java	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/unit/JmxNotificationsTestCase.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -31,8 +31,8 @@
 
 import junit.framework.TestCase;
 
+import org.jboss.bootstrap.api.server.Server;
 import org.jboss.bootstrap.impl.base.server.TestNoOpServer;
-import org.jboss.bootstrap.spi.server.Server;
 import org.jboss.logging.Logger;
 import org.junit.After;
 import org.junit.Before;

Modified: projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/unit/ServerConcurrentStartShutdownTestCase.java
===================================================================
--- projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/unit/ServerConcurrentStartShutdownTestCase.java	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/unit/ServerConcurrentStartShutdownTestCase.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -24,11 +24,11 @@
 
 import junit.framework.TestCase;
 
+import org.jboss.bootstrap.api.lifecycle.LifecycleState;
 import org.jboss.bootstrap.impl.base.config.unit.ConfigValidationTestCase;
 import org.jboss.bootstrap.impl.base.server.InterruptibleStartupServer;
 import org.jboss.bootstrap.impl.base.server.TestExceptionOnStartServer;
 import org.jboss.bootstrap.impl.base.server.TestExceptionOnStartServer.StartException;
-import org.jboss.bootstrap.spi.lifecycle.LifecycleState;
 import org.jboss.logging.Logger;
 import org.junit.Test;
 

Modified: projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/unit/ServerInitializationTestCase.java
===================================================================
--- projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/unit/ServerInitializationTestCase.java	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/unit/ServerInitializationTestCase.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -24,12 +24,12 @@
 
 import junit.framework.TestCase;
 
+import org.jboss.bootstrap.api.config.ServerConfig;
 import org.jboss.bootstrap.impl.base.config.CountingServerInitializer;
 import org.jboss.bootstrap.impl.base.config.TestConfigFactory;
 import org.jboss.bootstrap.impl.base.config.TestServerConfig;
 import org.jboss.bootstrap.impl.base.config.TestServerInitializer;
 import org.jboss.bootstrap.impl.base.server.TestNoOpServer;
-import org.jboss.bootstrap.spi.config.ServerConfig;
 import org.jboss.logging.Logger;
 import org.junit.After;
 import org.junit.Before;

Modified: projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/unit/ServerLifecycleEventCallbackTestCase.java
===================================================================
--- projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/unit/ServerLifecycleEventCallbackTestCase.java	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/unit/ServerLifecycleEventCallbackTestCase.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -27,9 +27,9 @@
 
 import junit.framework.TestCase;
 
+import org.jboss.bootstrap.api.lifecycle.LifecycleState;
 import org.jboss.bootstrap.impl.base.server.LifecycleStateChangeCapturingEventHander;
 import org.jboss.bootstrap.impl.base.server.TestNoOpServer;
-import org.jboss.bootstrap.spi.lifecycle.LifecycleState;
 import org.jboss.logging.Logger;
 import org.junit.After;
 import org.junit.Before;

Modified: projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/unit/ServerLifecycleTestCase.java
===================================================================
--- projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/unit/ServerLifecycleTestCase.java	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/server/unit/ServerLifecycleTestCase.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -24,6 +24,7 @@
 
 import junit.framework.TestCase;
 
+import org.jboss.bootstrap.api.lifecycle.LifecycleState;
 import org.jboss.bootstrap.impl.base.config.CountingConfigurationValidator;
 import org.jboss.bootstrap.impl.base.config.CountingServerInitializer;
 import org.jboss.bootstrap.impl.base.config.TestConfigFactory;
@@ -33,7 +34,6 @@
 import org.jboss.bootstrap.impl.base.config.TestServerInitializer;
 import org.jboss.bootstrap.impl.base.config.unit.ConfigValidationTestCase;
 import org.jboss.bootstrap.impl.base.server.TestNoOpServer;
-import org.jboss.bootstrap.spi.lifecycle.LifecycleState;
 import org.jboss.logging.Logger;
 import org.junit.After;
 import org.junit.Before;

Modified: projects/bootstrap/trunk/impl-mc/pom.xml
===================================================================
--- projects/bootstrap/trunk/impl-mc/pom.xml	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/impl-mc/pom.xml	2009-07-30 18:56:05 UTC (rev 91840)
@@ -26,7 +26,7 @@
   <properties>
 
     <version.org.jboss.bootstrap_jboss.bootstrap.impl.base>2.0.0-alpha-3</version.org.jboss.bootstrap_jboss.bootstrap.impl.base>
-    <version.org.jboss.bootstrap_jboss.bootstrap.spi.mc>2.0.0-alpha-1</version.org.jboss.bootstrap_jboss.bootstrap.spi.mc>
+    <version.org.jboss.bootstrap_jboss.bootstrap.spi.mc>2.0.0-SNAPSHOT</version.org.jboss.bootstrap_jboss.bootstrap.spi.mc>
     <version.org.jboss.man_jboss.managed>2.1.0.SP1</version.org.jboss.man_jboss.managed>
 
   </properties>

Modified: projects/bootstrap/trunk/impl-mc/src/main/java/org/jboss/bootstrap/impl/mc/server/AbstractMCServerBase.java
===================================================================
--- projects/bootstrap/trunk/impl-mc/src/main/java/org/jboss/bootstrap/impl/mc/server/AbstractMCServerBase.java	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/impl-mc/src/main/java/org/jboss/bootstrap/impl/mc/server/AbstractMCServerBase.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -32,10 +32,11 @@
 import org.jboss.bootstrap.impl.base.xml.BootstrapParser;
 import org.jboss.bootstrap.impl.mc.deployer.TempBasicXMLDeployer;
 import org.jboss.bootstrap.spi.config.InvalidConfigurationException;
+import org.jboss.bootstrap.spi.config.ServerConfig;
 import org.jboss.bootstrap.spi.lifecycle.LifecycleEventException;
-import org.jboss.bootstrap.spi.mc.config.MCBasedServerConfig;
 import org.jboss.bootstrap.spi.mc.server.MCBasedServer;
 import org.jboss.bootstrap.spi.metadata.BootstrapMetaData;
+import org.jboss.bootstrap.spi.server.Server;
 import org.jboss.kernel.Kernel;
 import org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap;
 import org.jboss.kernel.spi.dependency.KernelController;
@@ -54,7 +55,7 @@
  * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
  * @version $Revision: $
  */
-public abstract class AbstractMCServerBase<K extends MCBasedServer<K, T>, T extends MCBasedServerConfig<T>>
+public abstract class AbstractMCServerBase<K extends Server<K, T>, T extends ServerConfig<T>>
       extends
          AbstractServer<K, T> implements MCBasedServer<K, T>
 {

Modified: projects/bootstrap/trunk/pom.xml
===================================================================
--- projects/bootstrap/trunk/pom.xml	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/pom.xml	2009-07-30 18:56:05 UTC (rev 91840)
@@ -32,6 +32,8 @@
   <!-- Aggregate Modules -->
   <modules>
     <module>build</module>
+    <module>api</module>
+    <module>api-as</module>
     <module>impl-as</module>
     <module>impl-base</module>
     <module>impl-mc</module>

Modified: projects/bootstrap/trunk/spi/pom.xml
===================================================================
--- projects/bootstrap/trunk/spi/pom.xml	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/spi/pom.xml	2009-07-30 18:56:05 UTC (rev 91840)
@@ -24,6 +24,8 @@
 
   <!-- Properties -->
   <properties>
+  
+    <version.org.jboss.bootstrap_jboss.bootstrap.api>2.0.0-SNAPSHOT</version.org.jboss.bootstrap_jboss.bootstrap.api>
 
   </properties>
 
@@ -34,6 +36,12 @@
 
   <!-- Dependencies -->
   <dependencies>
+  
+    <dependency>
+      <groupId>org.jboss.bootstrap</groupId>
+      <artifactId>jboss-bootstrap-api</artifactId>
+      <version>${version.org.jboss.bootstrap_jboss.bootstrap.api}</version>
+    </dependency>
 
   </dependencies>
 </project>

Modified: projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/Bootstrap.java
===================================================================
--- projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/Bootstrap.java	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/Bootstrap.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -21,8 +21,8 @@
  */
 package org.jboss.bootstrap.spi;
 
-import org.jboss.bootstrap.spi.config.ServerConfig;
-import org.jboss.bootstrap.spi.server.Server;
+import org.jboss.bootstrap.api.config.ServerConfig;
+import org.jboss.bootstrap.api.server.Server;
 
 /**
  * Bootstrap

Modified: projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/config/ConfigurationInitializer.java
===================================================================
--- projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/config/ConfigurationInitializer.java	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/config/ConfigurationInitializer.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -22,6 +22,9 @@
 
 package org.jboss.bootstrap.spi.config;
 
+import org.jboss.bootstrap.api.config.InvalidConfigurationException;
+import org.jboss.bootstrap.api.config.ServerConfig;
+
 /**
  * ConfigurationInitializer
  * 

Modified: projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/config/ConfigurationValidator.java
===================================================================
--- projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/config/ConfigurationValidator.java	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/config/ConfigurationValidator.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -22,6 +22,9 @@
 
 package org.jboss.bootstrap.spi.config;
 
+import org.jboss.bootstrap.api.config.InvalidConfigurationException;
+import org.jboss.bootstrap.api.config.ServerConfig;
+
 /**
  * ConfigurationValidator
  * 

Deleted: projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/config/InvalidConfigurationException.java
===================================================================
--- projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/config/InvalidConfigurationException.java	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/config/InvalidConfigurationException.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -1,75 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.jboss.bootstrap.spi.config;
-
-/**
- * InvalidConfigurationException
- * 
- * Indicates that a particular configuration is not 
- * valid for a Server
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public class InvalidConfigurationException extends Exception
-{
-
-   /**
-    * 
-    */
-   private static final long serialVersionUID = 1L;
-
-   /**
-    * 
-    */
-   public InvalidConfigurationException()
-   {
-      super();
-   }
-
-   /**
-    * @param message
-    * @param cause
-    */
-   public InvalidConfigurationException(String message, Throwable cause)
-   {
-      super(message, cause);
-   }
-
-   /**
-    * @param message
-    */
-   public InvalidConfigurationException(String message)
-   {
-      super(message);
-   }
-
-   /**
-    * @param cause
-    */
-   public InvalidConfigurationException(Throwable cause)
-   {
-      super(cause);
-   }
-
-}

Deleted: projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/config/ServerConfig.java
===================================================================
--- projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/config/ServerConfig.java	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/config/ServerConfig.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -1,210 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.jboss.bootstrap.spi.config;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Map;
-import java.util.Properties;
-
-/**
- * ServerConfig
- * 
- * Configuration used in Server creation and initialization
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public interface ServerConfig<T extends ServerConfig<?>>
-{
-   //-------------------------------------------------------------------------------------||
-   // Constants --------------------------------------------------------------------------||
-   //-------------------------------------------------------------------------------------||
-
-   /**
-    * Property denoting the URL pointing to the home of 
-    * the bootstrap (from which other properties may be defaulted)
-    */
-   String PROP_KEY_BOOTSTRAP_HOME_URL = "jboss.bootstrap.home.url";
-
-   /**
-    * Property denoting the name of the bootstrap configuration
-    */
-   String PROP_KEY_BOOTSTRAP_NAME = "jboss.bootstrap.name";
-
-   /**
-    * Property denoting the URL of the bootstrap configuration 
-    */
-   String PROP_KEY_BOOTSTRAP_URL = "jboss.bootstrap.url";
-
-   //-------------------------------------------------------------------------------------||
-   // Contracts --------------------------------------------------------------------------||
-   //-------------------------------------------------------------------------------------||
-
-   /**
-    * Obtains the location of the bootstrap directory.  Corresponds to 
-    * {@link ServerConfig#PROP_KEY_BOOTSTRAP_HOME_URL}.
-    * 
-    * @return
-    */
-   URL getBootstrapHome();
-
-   /**
-    * Sets the location of the bootstrap directory.  Corresponds to 
-    * {@link ServerConfig#PROP_KEY_BOOTSTRAP_HOME_URL}.
-    * 
-    * @param bootstrapHome
-    * @return This configuration
-    * @throws IllegalArgumentException If the bootstrap home location was not specified
-    * @throws IllegalStateException If the configuration has been frozen
-    */
-   T bootstrapHome(URL bootstrapHome) throws IllegalArgumentException, IllegalStateException;
-
-   /**
-    * Sets the location of the bootstrap directory.  Corresponds to 
-    * {@link ServerConfig#PROP_KEY_BOOTSTRAP_HOME_URL}.
-    * 
-    * @param bootstrapHome
-    * @return This configuration
-    * @throws IllegalArgumentException If the bootstrap home location was not specified, 
-    *       or could not be assigned to a URL (ie. {@link MalformedURLException}
-    * @throws IllegalStateException If the configuration has been frozen
-    */
-   T bootstrapHome(String bootstrapHome) throws IllegalArgumentException, IllegalStateException;
-
-   /**
-    * Obtains the location of the bootstrap file.  Corresponds to 
-    * {@link ServerConfig#PROP_KEY_BOOTSTRAP_URL}.
-    * 
-    * @return
-    */
-   URL getBootstrapUrl();
-
-   /**
-    * Sets the location of the bootstrap file.  Corresponds to 
-    * {@link ServerConfig#PROP_KEY_BOOTSTRAP_URL}.
-    * 
-    * @param bootstrapLocation
-    * @return This configuration
-    * @throws IllegalArgumentException If the location was not specified
-    * @throws IllegalStateException If the configuration has been frozen
-    */
-   T bootstrapUrl(URL bootstrapLocation) throws IllegalArgumentException, IllegalStateException;
-
-   /**
-    * Sets the location of the bootstrap file.  Corresponds to 
-    * {@link ServerConfig#PROP_KEY_BOOTSTRAP_URL}.
-    * 
-    * @param bootstrapUrl
-    * @return This configuration
-    * @throws IllegalArgumentException If the bootstrap URL location was not specified, 
-    *       or could not be assigned to a URL (ie. {@link MalformedURLException}
-    * @throws IllegalStateException If the configuration has been frozen
-    */
-   T bootstrapUrl(String bootstrapUrl) throws IllegalArgumentException, IllegalStateException;
-
-   /**
-    * Obtains the name of the bootstrap configuration.  Corresponds to 
-    * {@link ServerConfig#PROP_KEY_BOOTSTRAP_NAME}.
-    * 
-    * @return
-    */
-   String getBootstrapName();
-
-   /**
-    * Sets the name of the bootstrap configuration file.  Corresponds to 
-    * {@link ServerConfig#PROP_KEY_BOOTSTRAP_NAME}.
-    * 
-    * @param name
-    * @return This configuration
-    * @throws IllegalArgumentException If the name was not specified
-    * @throws IllegalStateException If the configuration has been frozen
-    */
-   T bootstrapName(String name) throws IllegalArgumentException, IllegalStateException;
-
-   /**
-    * Returns an immutable copy of the properties used in configuring the server
-    * 
-    * @return
-    */
-   Map<String, String> getProperties();
-
-   /**
-    * Returns the configuration property for the specified key, 
-    * or null if not present 
-    * 
-    * @return
-    * @param key The key
-    * @throws IllegalArgumentException If the key was not specified
-    */
-   String getProperty(String key) throws IllegalArgumentException;
-
-   /**
-    * Sets the property with the specified key to the specified value
-    * 
-    * @param key
-    * @param value
-    * @return This configuration
-    * @throws IllegalArgumentException If the key was not supplied
-    * @throws IllegalStateException If the configuration has been frozen
-    */
-   T property(String key, String value) throws IllegalArgumentException, IllegalStateException;
-
-   /**
-    * Sets the specified properties upon the configuration
-    * 
-    * @param properties
-    * @return
-    * @throws IllegalArgumentException If the properties are null
-    * @throws IllegalStateException If the configuration has been frozen
-    */
-   T properties(Map<String, String> properties) throws IllegalArgumentException, IllegalStateException;
-
-   /**
-    * Sets the specified properties upon the configuration.  For true type safety, 
-    * it is recommended to use {@link ServerConfig#properties(Map)} instead.  This
-    * is provided for compatibility with {@link System#getProperties()}.
-    * 
-    * @param properties
-    * @return
-    * @throws IllegalArgumentException If the properties are null, or if any of the 
-    *   properties are not String/String pairs.
-    * @throws IllegalStateException If the configuration has been frozen
-    */
-   T properties(Properties properties) throws IllegalArgumentException, IllegalStateException;
-
-   /**
-    * Freezes the configuration, marking it as immutable.  Will typically 
-    * be invoked by a server during the start lifecycle.  
-    * 
-    * @throws IllegalStateException
-    */
-   void freeze() throws IllegalStateException;
-
-   /**
-    * Returns whether or not this configuration is frozen and immutable
-    * 
-    * @return
-    */
-   boolean isFrozen();
-}

Modified: projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/metadata/BootstrapMetaData.java
===================================================================
--- projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/metadata/BootstrapMetaData.java	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/metadata/BootstrapMetaData.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -34,7 +34,7 @@
 {
    /** The serialVersionUID */
    private static final long serialVersionUID = 7850412833463503239L;
-   
+
    /** The bootstrap urls */
    private List<String> bootstrapURLs;
 
@@ -53,11 +53,11 @@
     * 
     * @param bootstrapURLs the bootstrapURLs.
     */
-   public void setBootstrapURLs(List<String> bootstrapURLs)
+   public void setBootstrapURLs(final List<String> bootstrapURLs)
    {
       this.bootstrapURLs = bootstrapURLs;
    }
-   
+
    @Override
    public String toString()
    {

Deleted: projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/server/Server.java
===================================================================
--- projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/server/Server.java	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/server/Server.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -1,259 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.jboss.bootstrap.spi.server;
-
-import java.util.EnumSet;
-
-import org.jboss.bootstrap.spi.Bootstrap;
-import org.jboss.bootstrap.spi.config.ConfigurationInitializer;
-import org.jboss.bootstrap.spi.config.ConfigurationValidator;
-import org.jboss.bootstrap.spi.config.InvalidConfigurationException;
-import org.jboss.bootstrap.spi.config.ServerConfig;
-import org.jboss.bootstrap.spi.lifecycle.LifecycleEventException;
-import org.jboss.bootstrap.spi.lifecycle.LifecycleEventHandler;
-import org.jboss.bootstrap.spi.lifecycle.LifecycleState;
-
-/**
- * Server
- * 
- * Contract for generic Server implementations
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public interface Server<K extends Server<K, T>, T extends ServerConfig<T>>
-{
-   //-------------------------------------------------------------------------------------||
-   // Constants --------------------------------------------------------------------------||
-   //-------------------------------------------------------------------------------------||
-
-   /** 
-    * The JMX notification event type sent on end of server startup 
-    */
-   public final String START_NOTIFICATION_TYPE = "org.jboss.system.server.started";
-
-   /** 
-    * The JMX notification event type sent on begin of the server shutdown  
-    */
-   public final String STOP_NOTIFICATION_TYPE = "org.jboss.system.server.stopped";
-
-   //-------------------------------------------------------------------------------------||
-   // Contracts --------------------------------------------------------------------------||
-   //-------------------------------------------------------------------------------------||
-
-   /**
-    * Prepares the server for startup.  If {@link Server#getServerInitializer()} is not 
-    * null, will invoke {@link ServerInitializer#initialize(Server)}.
-    * Freezes the configuration from further 
-    * mutable actions by invoking {@link ServerConfig#freeze()}.  Finally
-    * sets the current state to {@link LifecycleState#IDLE}
-    * 
-    * @throws IllegalStateException  If the server is not in state {@link LifecycleState#PRE_INIT}, 
-    *       or if the configuration has not been defined
-    * @throws InvalidConfigurationException
-    * @throws LifecycleEventException If an error was encountered in the lifecycle handlers for this event
-    */
-   void initialize() throws IllegalStateException, InvalidConfigurationException, LifecycleEventException;
-
-   /**
-    * Returns the initializer to be used in initialization, or null
-    * if none is defined
-    * 
-    * @return
-    */
-   ServerInitializer<K, T> getServerInitializer();
-
-   /**
-    * Initializer to use in server initialization.  Pass
-    * null to disable further initialization.
-    * 
-    * @param serverInitializer
-    * @return This server
-    * @throws IllegalStateException If the server state is anything aside from
-    * {@link LifecycleState#PRE_INIT}
-    */
-   void setServerInitializer(ServerInitializer<K, T> serverInitializer) throws IllegalStateException;
-
-   /**
-    * Returns the initializer for the underlying {@link ServerConfig} 
-    * 
-    * @return
-    */
-   ConfigurationInitializer<T> getConfigInitializer();
-
-   /**
-    * Sets the initializer to be used upon the configuration.  Pass
-    * <code>null</code> to remove the initializer.
-    * 
-    * @param configInitializer
-    * @return This server
-    * @throws IllegalStateException If the server state is anything aside from
-    * {@link LifecycleState#PRE_INIT}
-    */
-   void setConfigInitializer(ConfigurationInitializer<T> configInitializer) throws IllegalStateException;
-
-   /**
-    * Start lifecycle of the Server, optionally invoking upon
-    * {@link Server#initialize()} if the state is {@link LifecycleState#PRE_INIT}.
-    * During execution the state will be {@link LifecycleState#STARTING}, and upon
-    * successful completion will be {@link LifecycleState#STARTED}. 
-    * 
-    * @throws IllegalStateException If the Server is already started or starting
-    * @throws Exception
-    */
-   void start() throws IllegalStateException, Exception;
-   
-   /**
-    * Stop lifecycle of the Server.  During execution the state will be 
-    * {@link LifecycleState#STOPPING}, and upon
-    * successful completion will be {@link LifecycleState#IDLE}.  If a 
-    * server initialzer is defined then {@link ServerInitializer#cleanup(Server)}
-    * will be invoked during this call.
-    * 
-    * @throws IllegalStateException If the Server is not started
-    * @throws Exception
-    */
-   void stop() throws IllegalStateException, Exception;
-
-   /**
-    * Alias for {@link Server#stop()}
-    * 
-    * @throws IllegalStateException If the Server is not started
-    * @throws Exception
-    */
-   void shutdown() throws IllegalStateException, Exception;
-
-   /**
-    * Returns the current state of the Server lifecycle
-    * 
-    * @return The {@link LifecycleState}
-    */
-   LifecycleState getState();
-
-   /**
-    * Registers the specified handler to fire when 
-    * the server's state enters that of the specified state.
-    * 
-    * @param state
-    * @param handler
-    * @throws IllegalArgumentException If either the state or the handler are unspecified
-    */
-   void registerEventHandler(LifecycleState state, LifecycleEventHandler handler) throws IllegalArgumentException;
-
-   /**
-    * Registers the specified handler to fire when 
-    * the server's state enters one of the the specified states
-    * 
-    * @param handler
-    * @param states
-    * @throws IllegalArgumentException If either the states or the handler are unspecified
-    */
-   void registerEventHandler(LifecycleEventHandler handler, EnumSet<LifecycleState> states)
-         throws IllegalArgumentException;
-
-   /**
-    * Registers the specified handler to fire when 
-    * the server's state enters one of the the specified states
-    * 
-    * @param handler
-    * @param states
-    * @throws IllegalArgumentException If either the states or the handler are unspecified
-    */
-   void registerEventHandler(LifecycleEventHandler handler, LifecycleState... states) throws IllegalArgumentException;
-
-   /**
-    * Registers the specified handlers to fire when 
-    * the server's state enters that of the specified state.
-    * 
-    * @param state
-    * @param handlers
-    * @throws IllegalArgumentException If either the state or the handlers are unspecified
-    */
-   void registerEventHandlers(LifecycleState state, LifecycleEventHandler... handlers) throws IllegalArgumentException;
-
-   /**
-    * Unregisters the specified event handler from firing 
-    * when the server state changes to the specified state.
-    * 
-    * @param state
-    * @param handler
-    * @return Whether or not the handler was removed (ie. false if not registered)
-    * @throws IllegalArgumentException If either the state or handler are unspecified
-    */
-   boolean unregisterEventHandler(LifecycleEventHandler handler, LifecycleState state) throws IllegalArgumentException;
-
-   /**
-    * Returns the underlying server configuration.  If
-    * the server state is anything aside from 
-    * {@link LifecycleState#PRE_INIT}, the configuration 
-    * will be immutable / frozen.
-    * 
-    * @return
-    */
-   T getConfiguration();
-
-   /**
-    * Sets the configuration
-    * 
-    * @param config
-    * @return This server
-    */
-   void setConfiguration(T config);
-
-   /**
-    * Returns the (possibly null) validator
-    * to be used in asserting the validity of a supplied configuration
-    * 
-    * @return
-    */
-   ConfigurationValidator<T> getValidator();
-
-   /**
-    * Sets the specified validator to be used in 
-    * asserting the validity of a supplied configuration. 
-    * May be null to remove validation.
-    * 
-    * @param validator
-    * @return This server
-    * @throws IllegalStateException If the server state is anything aside from
-    * {@link LifecycleState#PRE_INIT}
-    */
-   void setValidator(ConfigurationValidator<T> validator) throws IllegalStateException;
-
-   /**
-    * Adds the specified bootstrap to those to be run on {@link Server#start()}
-    * 
-    * @param bootstrap
-    * @throws IllegalArgumentException If the specified bootstrap is null
-    */
-   void addBootstrap(Bootstrap<K, T> bootstrap) throws IllegalArgumentException;
-
-   /**
-    * Removes the specified bootstrap from those to be run on {@link Server#start()}
-    * 
-    * @param bootstrap
-    * @throws IllegalArgumentException If the specified bootstrap is not currently
-    *       designated as to be run
-    */
-   void removeBootstrap(Bootstrap<K, T> bootstrap) throws IllegalArgumentException;
-}

Deleted: projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/server/ServerInitializer.java
===================================================================
--- projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/server/ServerInitializer.java	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/server/ServerInitializer.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -1,61 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.jboss.bootstrap.spi.server;
-
-import org.jboss.bootstrap.spi.config.ServerConfig;
-import org.jboss.bootstrap.spi.lifecycle.LifecycleState;
-
-/**
- * ServerInitializer
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public interface ServerInitializer<K extends Server<K, T>, T extends ServerConfig<T>>
-{
-   //-------------------------------------------------------------------------------------||
-   // Contracts --------------------------------------------------------------------------||
-   //-------------------------------------------------------------------------------------||
-
-   /**
-    * Initializes the specified server.  May perform tasks such
-    * as validation and defaulting of an underlying configuration.
-    * 
-    * @param server The server to initialize
-    * @throws IllegalArgumentException If the server was not specified / null, or 
-    *       its configuration is somehow invalid
-    * @throws IllegalStateException If the server's state is not 
-    *       {@link LifecycleState#PRE_INIT}
-    */
-   void initialize(K server) throws IllegalArgumentException, IllegalStateException;
-
-   /**
-    * Cleans up any actions taken during the initialization phase
-    * in preparation for server shutdown
-    * 
-    * @param server
-    * @throws IllegalArgumentException
-    * @throws IllegalStateException If the server's state is not {@link LifecycleState#STOPPING}
-    */
-   void cleanup(K server) throws IllegalArgumentException, IllegalStateException;
-}

Added: projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/server/ServerInitializer.java
===================================================================
--- projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/server/ServerInitializer.java	                        (rev 0)
+++ projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/server/ServerInitializer.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -0,0 +1,62 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.bootstrap.spi.server;
+
+import org.jboss.bootstrap.api.config.ServerConfig;
+import org.jboss.bootstrap.api.lifecycle.LifecycleState;
+import org.jboss.bootstrap.api.server.Server;
+
+/**
+ * ServerInitializer
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface ServerInitializer<K extends Server<K, T>, T extends ServerConfig<T>>
+{
+   //-------------------------------------------------------------------------------------||
+   // Contracts --------------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Initializes the specified server.  May perform tasks such
+    * as validation and defaulting of an underlying configuration.
+    * 
+    * @param server The server to initialize
+    * @throws IllegalArgumentException If the server was not specified / null, or 
+    *       its configuration is somehow invalid
+    * @throws IllegalStateException If the server's state is not 
+    *       {@link LifecycleState#PRE_INIT}
+    */
+   void initialize(K server) throws IllegalArgumentException, IllegalStateException;
+
+   /**
+    * Cleans up any actions taken during the initialization phase
+    * in preparation for server shutdown
+    * 
+    * @param server
+    * @throws IllegalArgumentException
+    * @throws IllegalStateException If the server's state is not {@link LifecycleState#STOPPING}
+    */
+   void cleanup(K server) throws IllegalArgumentException, IllegalStateException;
+}


Property changes on: projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/server/ServerInitializer.java
___________________________________________________________________
Name: svn:executable
   + *

Added: projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/server/ServerProvider.java
===================================================================
--- projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/server/ServerProvider.java	                        (rev 0)
+++ projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/server/ServerProvider.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -0,0 +1,120 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.bootstrap.spi.server;
+
+import org.jboss.bootstrap.api.config.ServerConfig;
+import org.jboss.bootstrap.api.lifecycle.LifecycleState;
+import org.jboss.bootstrap.api.server.Server;
+import org.jboss.bootstrap.spi.Bootstrap;
+import org.jboss.bootstrap.spi.config.ConfigurationInitializer;
+import org.jboss.bootstrap.spi.config.ConfigurationValidator;
+
+/**
+ * Server
+ * 
+ * Contract for generic Server implementations; not intended
+ * to be exposed as a client API
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface ServerProvider<K extends ServerProvider<K, T>, T extends ServerConfig<T>> extends Server<K, T>
+{
+   //-------------------------------------------------------------------------------------||
+   // Contracts --------------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Returns the initializer for the underlying {@link ServerConfig} 
+    * 
+    * @return
+    */
+   ConfigurationInitializer<T> getConfigInitializer();
+
+   /**
+    * Sets the initializer to be used upon the configuration.  Pass
+    * <code>null</code> to remove the initializer.
+    * 
+    * @param configInitializer
+    * @return This server
+    * @throws IllegalStateException If the server state is anything aside from
+    * {@link LifecycleState#PRE_INIT}
+    */
+   void setConfigInitializer(ConfigurationInitializer<T> configInitializer) throws IllegalStateException;
+
+   /**
+    * Returns the initializer to be used in initialization, or null
+    * if none is defined
+    * 
+    * @return
+    */
+   ServerInitializer<K, T> getServerInitializer();
+
+   /**
+    * Returns the (possibly null) validator
+    * to be used in asserting the validity of a supplied configuration
+    * 
+    * @return
+    */
+   ConfigurationValidator<T> getValidator();
+
+   /**
+    * Sets the specified validator to be used in 
+    * asserting the validity of a supplied configuration. 
+    * May be null to remove validation.
+    * 
+    * @param validator
+    * @return This server
+    * @throws IllegalStateException If the server state is anything aside from
+    * {@link LifecycleState#PRE_INIT}
+    */
+   void setValidator(ConfigurationValidator<T> validator) throws IllegalStateException;
+
+   /**
+    * Initializer to use in server initialization.  Pass
+    * null to disable further initialization.
+    * 
+    * @param serverInitializer
+    * @return This server
+    * @throws IllegalStateException If the server state is anything aside from
+    * {@link LifecycleState#PRE_INIT}
+    */
+   void setServerInitializer(ServerInitializer<K, T> serverInitializer) throws IllegalStateException;
+
+   /**
+    * Adds the specified bootstrap to those to be run on {@link ServerProvider#start()}
+    * 
+    * @param bootstrap
+    * @throws IllegalArgumentException If the specified bootstrap is null
+    */
+   void addBootstrap(Bootstrap<K, T> bootstrap) throws IllegalArgumentException;
+
+   /**
+    * Removes the specified bootstrap from those to be run on {@link ServerProvider#start()}
+    * 
+    * @param bootstrap
+    * @throws IllegalArgumentException If the specified bootstrap is not currently
+    *       designated as to be run
+    */
+   void removeBootstrap(Bootstrap<K, T> bootstrap) throws IllegalArgumentException;
+}

Modified: projects/bootstrap/trunk/spi-as/pom.xml
===================================================================
--- projects/bootstrap/trunk/spi-as/pom.xml	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/spi-as/pom.xml	2009-07-30 18:56:05 UTC (rev 91840)
@@ -25,7 +25,7 @@
   <!-- Properties -->
   <properties>
 
-    <version.org.jboss.bootstrap_jboss.bootstrap.spi.mc>2.0.0-alpha-1</version.org.jboss.bootstrap_jboss.bootstrap.spi.mc>
+    <version.org.jboss.bootstrap_jboss.bootstrap.spi.mc>2.0.0-SNAPSHOT</version.org.jboss.bootstrap_jboss.bootstrap.spi.mc>
 
   </properties>
 

Copied: projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/api/as/server/JBossASBasedServer.java (from rev 91641, projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/server/JBossASBasedServer.java)
===================================================================
--- projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/api/as/server/JBossASBasedServer.java	                        (rev 0)
+++ projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/api/as/server/JBossASBasedServer.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+  *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bootstrap.api.as.server;
+
+import org.jboss.bootstrap.spi.as.config.JBossASBasedServerConfig;
+import org.jboss.bootstrap.spi.server.Server;
+
+/**
+ * JBossASBasedServer
+ * 
+ * Untyped client view of a JBoss AS Server; may
+ * be extended
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface JBossASBasedServer<K extends JBossASBasedServer<K, T>, T extends JBossASBasedServerConfig<T>>
+      extends
+         Server<K, T>
+{
+   //-------------------------------------------------------------------------------------||
+   // Contracts --------------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+}

Added: projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/api/as/server/JBossASServer.java
===================================================================
--- projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/api/as/server/JBossASServer.java	                        (rev 0)
+++ projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/api/as/server/JBossASServer.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.bootstrap.api.as.server;
+
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
+
+/**
+ * JBossASServer
+ * 
+ * Client view of a JBoss AS Server
+ *
+ * @author Jason Dillon
+ * @author Scott.Stark at jboss.org
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface JBossASServer extends JBossASBasedServer<JBossASServer, JBossASServerConfig>
+{
+   //-------------------------------------------------------------------------------------||
+   // Contracts --------------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+}


Property changes on: projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/api/as/server/JBossASServer.java
___________________________________________________________________
Name: svn:executable
   + *

Copied: projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/api/as/server/JBossASServerFactory.java (from rev 91641, projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/server/JBossASServerFactory.java)
===================================================================
--- projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/api/as/server/JBossASServerFactory.java	                        (rev 0)
+++ projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/api/as/server/JBossASServerFactory.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -0,0 +1,220 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.bootstrap.api.as.server;
+
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfigFactory;
+import org.jboss.bootstrap.spi.factory.ServerFactory;
+import org.jboss.bootstrap.spi.server.Server;
+
+/**
+ * JBossASServerFactory
+ * 
+ * Factory of {@link JBossASServer} implementations
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class JBossASServerFactory
+{
+
+   //-------------------------------------------------------------------------------------||
+   // Class Members ----------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * The FQN of the default server implementation class to create
+    */
+   public static final String DEFAULT_AS_SERVER_IMPL_CLASS_NAME = "org.jboss.bootstrap.impl.as.server.JBossASServerImpl";
+
+   //-------------------------------------------------------------------------------------||
+   // Constructor ------------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Constructor, should not be used
+    */
+   private JBossASServerFactory()
+   {
+      // No external access
+   }
+
+   //-------------------------------------------------------------------------------------||
+   // Factory Methods --------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Creates a JBossASServer from the default implementation class name
+    * {@link JBossASServerFactory#DEFAULT_AS_SERVER_IMPL_CLASS_NAME}, using the 
+    * Thread Context ClassLoader.  The returned server will additionally be created using
+    * the TCCL.
+    * 
+    * @return The newly-created Server
+    */
+   public static JBossASServer createServer()
+   {
+      return createServer(SecurityActions.getTccl());
+   }
+
+   /**
+    * Creates a JBossASServer from the default implementation class name
+    * {@link JBossASServerFactory#DEFAULT_AS_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.
+    * 
+    * @return The newly-created Server populated with a default configuration
+    */
+   public static JBossASServer createServerWithDefaultConfiguration()
+   {
+      return createServerWithDefaultConfiguration(SecurityActions.getTccl());
+   }
+
+   /**
+    * Creates a JBossASServer from the default implementation class name
+    * {@link JBossASServerFactory#DEFAULT_AS_SERVER_IMPL_CLASS_NAME}, using the
+    * specified ClassLoader.  The returned server will additionally be created using
+    * the ClassLoader denoted.
+    * 
+    * @throws IllegalArgumentException If the ClassLoader is null
+    * @return The newly-created Server 
+    */
+   public static JBossASServer createServer(final ClassLoader cl) throws IllegalArgumentException
+   {
+      try
+      {
+         return createServer(DEFAULT_AS_SERVER_IMPL_CLASS_NAME, cl);
+      }
+      catch (Exception e)
+      {
+         // An exception here is likely our fault, so throw a RuntimeException
+         throw new RuntimeException("Error in creating the Server", e);
+      }
+   }
+
+   /**
+    * Creates a JBossASServer from the default implementation class name
+    * {@link JBossASServerFactory#DEFAULT_AS_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.
+    * 
+    * @throws IllegalArgumentException If the ClassLoader is null
+    * @return The newly-created Server populated with a default configuration
+    */
+   public static JBossASServer createServerWithDefaultConfiguration(final ClassLoader cl)
+         throws IllegalArgumentException
+   {
+      try
+      {
+         return createServerWithDefaultConfiguration(DEFAULT_AS_SERVER_IMPL_CLASS_NAME, cl);
+      }
+      catch (Exception e)
+      {
+         // An exception here is likely our fault, so throw a RuntimeException
+         throw new RuntimeException("Error in creating the Server", e);
+      }
+   }
+
+   /**
+    * Creates a JBossASServer from the specified implementation class name
+    * using the specified ClassLoader.  The returned server will additionally 
+    * be created using the ClassLoader denoted. 
+    * 
+    * @throws IllegalArgumentException If the ClassLoader or server implementation class is null
+    * @throws Exception If there was an error in creating the Server
+    * @return The newly-created Server
+    */
+   public static JBossASServer createServer(final String implClassName, final ClassLoader cl)
+         throws IllegalArgumentException, Exception
+   {
+      // Precondition check
+      if (cl == null)
+      {
+         throw new IllegalArgumentException(ClassLoader.class.getSimpleName() + " is required.");
+      }
+      if (implClassName == null || implClassName.length() == 0)
+      {
+         throw new IllegalArgumentException("Implementation class name must be specified");
+      }
+
+      // Get the server
+      final Server<?, ?> server = ServerFactory.createServer(implClassName, cl);
+
+      // Cast
+      final Class<JBossASServer> targetClass = JBossASServer.class;
+      JBossASServer asServer = null;
+      try
+      {
+         asServer = targetClass.cast(server);
+      }
+      catch (ClassCastException cce)
+      {
+         // Catch, explain giving some context, throw new
+         throw new ClassCastException("Specified server implementation class, " + implClassName
+               + " must be assignable to " + targetClass.getName());
+      }
+
+      // Set a default config
+      final JBossASServerConfig config = JBossASServerConfigFactory.createServerConfig(cl);
+      asServer.setConfiguration(config);
+
+      // Return
+      return asServer;
+   }
+
+   /**
+    * Creates a JBossASServer 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.
+    * 
+    * @throws IllegalArgumentException If the ClassLoader or server implementation class is null
+    * @throws Exception If there was an error in creating the Server
+    * @return The newly-created Server populated with a default configuration
+    */
+   public static JBossASServer createServerWithDefaultConfiguration(final String implClassName, final ClassLoader cl)
+         throws IllegalArgumentException, Exception
+   {
+      // Make the server, applying a default config
+      return applyDefaultConfiguration(createServer(implClassName, cl), cl);
+   }
+
+   //-------------------------------------------------------------------------------------||
+   // Internal Helper Methods ------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Sets a new, default configuration upon the specified server
+    * 
+    * @param server The server upon which we'll set a new config
+    * @param cl The ClassLoader used to create the new config
+    * @return The same server instance passed in, with a set config
+    */
+   private static JBossASServer applyDefaultConfiguration(final JBossASServer server, final ClassLoader cl)
+   {
+      // Set a default config
+      final JBossASServerConfig config = JBossASServerConfigFactory.createServerConfig(cl);
+      server.setConfiguration(config);
+      return server;
+   }
+}

Copied: projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/api/as/server/SecurityActions.java (from rev 91641, projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/server/SecurityActions.java)
===================================================================
--- projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/api/as/server/SecurityActions.java	                        (rev 0)
+++ projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/api/as/server/SecurityActions.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -0,0 +1,73 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.bootstrap.api.as.server;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+/**
+ * SecurityActions
+ * 
+ * Utility class for security actions, so as to provide
+ * some centralization without leaking privileged actions
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+class SecurityActions
+{
+
+   //-------------------------------------------------------------------------------------||
+   // Constructor ------------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * In place to prevent instanciation 
+    */
+   private SecurityActions()
+   {
+   }
+
+   //-------------------------------------------------------------------------------------||
+   // Utility Methods --------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Obtains the Thread Context ClassLoader
+    * 
+    * @return
+    */
+   static ClassLoader getTccl()
+   {
+      return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>()
+      {
+
+         public ClassLoader run()
+         {
+            // Return the TCCL
+            return Thread.currentThread().getContextClassLoader();
+         }
+
+      });
+   }
+}

Modified: projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/JBossASBootstrap.java
===================================================================
--- projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/JBossASBootstrap.java	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/JBossASBootstrap.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -22,9 +22,9 @@
 
 package org.jboss.bootstrap.spi.as;
 
+import org.jboss.bootstrap.api.as.server.JBossASBasedServer;
 import org.jboss.bootstrap.spi.Bootstrap;
 import org.jboss.bootstrap.spi.as.config.JBossASBasedServerConfig;
-import org.jboss.bootstrap.spi.as.server.JBossASBasedServer;
 
 /**
  * JBossASBootstrap

Deleted: projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/server/JBossASBasedServer.java
===================================================================
--- projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/server/JBossASBasedServer.java	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/server/JBossASBasedServer.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -1,93 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
-  *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.bootstrap.spi.as.server;
-
-import java.util.Date;
-import java.util.Map;
-
-import org.jboss.bootstrap.spi.as.config.JBossASBasedServerConfig;
-import org.jboss.bootstrap.spi.mc.server.MCBasedServer;
-import org.jboss.bootstrap.spi.server.Server;
-
-/**
- * JBossASBasedServer
- * 
- * Contract for JBoss Application Servers and extensions
- * thereof
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public interface JBossASBasedServer<K extends JBossASBasedServer<K, T>, T extends JBossASBasedServerConfig<T>>
-      extends
-         MCBasedServer<K, T>
-{
-   //-------------------------------------------------------------------------------------||
-   // Contracts --------------------------------------------------------------------------||
-   //-------------------------------------------------------------------------------------||
-
-   /** @return The server start date */
-   Date getStartDate();
-
-   /** @return The server version, the underlying version expressed as a String */
-   String getVersion();
-
-   /** @return The server version code name */
-   String getVersionName();
-
-   /** @return The full server version number */
-   String getVersionNumber();
-
-   /** @return The date the server was build (compiled) */
-   String getBuildNumber();
-
-   /** @return The JVM used to build the server */
-   String getBuildJVM();
-
-   /** @return The Operating System used to build the server */
-   String getBuildOS();
-
-   /** @return The build id */
-   String getBuildID();
-
-   /** @return The date the server was build */
-   String getBuildDate();
-
-   /**
-    * Get the optional server configuration metadata
-    * 
-    * @return A possibly empty map of configuration metadata
-    */
-   Map<String, Object> getMetaData();
-
-   /**
-    * Returns whether or not the server is started.
-    * 
-    * JBBOOT-80
-    * @return
-    * @deprecated Should be removed when we won't be targeting
-    * jboss-bootstrap for AS 5.x anymore.  AS6 will not support 
-    * this invocation, instead we should use {@link Server#getState()} 
-    */
-   @Deprecated
-   boolean isStarted();
-}

Added: projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/server/JBossASBasedServerProvider.java
===================================================================
--- projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/server/JBossASBasedServerProvider.java	                        (rev 0)
+++ projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/server/JBossASBasedServerProvider.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -0,0 +1,95 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+  *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bootstrap.spi.as.server;
+
+import java.util.Date;
+import java.util.Map;
+
+import org.jboss.bootstrap.api.as.server.JBossASBasedServer;
+import org.jboss.bootstrap.spi.as.config.JBossASBasedServerConfig;
+import org.jboss.bootstrap.spi.mc.server.MCBasedServer;
+import org.jboss.bootstrap.spi.server.Server;
+
+/**
+ * JBossASBasedServerProvider
+ * 
+ * Contract for implementations of JBoss Application Servers 
+ * and extensions thereof
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface JBossASBasedServerProvider<K extends JBossASBasedServer<K, T>, T extends JBossASBasedServerConfig<T>>
+      extends
+         MCBasedServer<K, T>,
+         JBossASBasedServer<K, T>
+{
+   //-------------------------------------------------------------------------------------||
+   // Contracts --------------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /** @return The server start date */
+   Date getStartDate();
+
+   /** @return The server version, the underlying version expressed as a String */
+   String getVersion();
+
+   /** @return The server version code name */
+   String getVersionName();
+
+   /** @return The full server version number */
+   String getVersionNumber();
+
+   /** @return The date the server was build (compiled) */
+   String getBuildNumber();
+
+   /** @return The JVM used to build the server */
+   String getBuildJVM();
+
+   /** @return The Operating System used to build the server */
+   String getBuildOS();
+
+   /** @return The build id */
+   String getBuildID();
+
+   /** @return The date the server was build */
+   String getBuildDate();
+
+   /**
+    * Get the optional server configuration metadata
+    * 
+    * @return A possibly empty map of configuration metadata
+    */
+   Map<String, Object> getMetaData();
+
+   /**
+    * Returns whether or not the server is started.
+    * 
+    * JBBOOT-80
+    * @return
+    * @deprecated Should be removed when we won't be targeting
+    * jboss-bootstrap for AS 5.x anymore.  AS6 will not support 
+    * this invocation, instead we should use {@link Server#getState()} 
+    */
+   @Deprecated
+   boolean isStarted();
+}

Deleted: projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/server/JBossASServer.java
===================================================================
--- projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/server/JBossASServer.java	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/server/JBossASServer.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -1,40 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.jboss.bootstrap.spi.as.server;
-
-import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
-
-/**
- * JBossASServer
- * 
- * Contract of a JBossAS Server
- *
- * @author Jason Dillon
- * @author Scott.Stark at jboss.org
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public interface JBossASServer extends JBossASBasedServer<JBossASServer, JBossASServerConfig>
-{
-
-}

Deleted: projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/server/JBossASServerFactory.java
===================================================================
--- projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/server/JBossASServerFactory.java	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/server/JBossASServerFactory.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -1,220 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.jboss.bootstrap.spi.as.server;
-
-import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
-import org.jboss.bootstrap.spi.as.config.JBossASServerConfigFactory;
-import org.jboss.bootstrap.spi.factory.ServerFactory;
-import org.jboss.bootstrap.spi.server.Server;
-
-/**
- * JBossASServerFactory
- * 
- * Factory of {@link JBossASServer} implementations
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-public class JBossASServerFactory
-{
-
-   //-------------------------------------------------------------------------------------||
-   // Class Members ----------------------------------------------------------------------||
-   //-------------------------------------------------------------------------------------||
-
-   /**
-    * The FQN of the default server implementation class to create
-    */
-   public static final String DEFAULT_AS_SERVER_IMPL_CLASS_NAME = "org.jboss.bootstrap.impl.as.server.JBossASServerImpl";
-
-   //-------------------------------------------------------------------------------------||
-   // Constructor ------------------------------------------------------------------------||
-   //-------------------------------------------------------------------------------------||
-
-   /**
-    * Constructor, should not be used
-    */
-   private JBossASServerFactory()
-   {
-      // No external access
-   }
-
-   //-------------------------------------------------------------------------------------||
-   // Factory Methods --------------------------------------------------------------------||
-   //-------------------------------------------------------------------------------------||
-
-   /**
-    * Creates a JBossASServer from the default implementation class name
-    * {@link JBossASServerFactory#DEFAULT_AS_SERVER_IMPL_CLASS_NAME}, using the 
-    * Thread Context ClassLoader.  The returned server will additionally be created using
-    * the TCCL.
-    * 
-    * @return The newly-created Server
-    */
-   public static JBossASServer createServer()
-   {
-      return createServer(SecurityActions.getTccl());
-   }
-
-   /**
-    * Creates a JBossASServer from the default implementation class name
-    * {@link JBossASServerFactory#DEFAULT_AS_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.
-    * 
-    * @return The newly-created Server populated with a default configuration
-    */
-   public static JBossASServer createServerWithDefaultConfiguration()
-   {
-      return createServerWithDefaultConfiguration(SecurityActions.getTccl());
-   }
-
-   /**
-    * Creates a JBossASServer from the default implementation class name
-    * {@link JBossASServerFactory#DEFAULT_AS_SERVER_IMPL_CLASS_NAME}, using the
-    * specified ClassLoader.  The returned server will additionally be created using
-    * the ClassLoader denoted.
-    * 
-    * @throws IllegalArgumentException If the ClassLoader is null
-    * @return The newly-created Server 
-    */
-   public static JBossASServer createServer(final ClassLoader cl) throws IllegalArgumentException
-   {
-      try
-      {
-         return createServer(DEFAULT_AS_SERVER_IMPL_CLASS_NAME, cl);
-      }
-      catch (Exception e)
-      {
-         // An exception here is likely our fault, so throw a RuntimeException
-         throw new RuntimeException("Error in creating the Server", e);
-      }
-   }
-
-   /**
-    * Creates a JBossASServer from the default implementation class name
-    * {@link JBossASServerFactory#DEFAULT_AS_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.
-    * 
-    * @throws IllegalArgumentException If the ClassLoader is null
-    * @return The newly-created Server populated with a default configuration
-    */
-   public static JBossASServer createServerWithDefaultConfiguration(final ClassLoader cl)
-         throws IllegalArgumentException
-   {
-      try
-      {
-         return createServerWithDefaultConfiguration(DEFAULT_AS_SERVER_IMPL_CLASS_NAME, cl);
-      }
-      catch (Exception e)
-      {
-         // An exception here is likely our fault, so throw a RuntimeException
-         throw new RuntimeException("Error in creating the Server", e);
-      }
-   }
-
-   /**
-    * Creates a JBossASServer from the specified implementation class name
-    * using the specified ClassLoader.  The returned server will additionally 
-    * be created using the ClassLoader denoted. 
-    * 
-    * @throws IllegalArgumentException If the ClassLoader or server implementation class is null
-    * @throws Exception If there was an error in creating the Server
-    * @return The newly-created Server
-    */
-   public static JBossASServer createServer(final String implClassName, final ClassLoader cl)
-         throws IllegalArgumentException, Exception
-   {
-      // Precondition check
-      if (cl == null)
-      {
-         throw new IllegalArgumentException(ClassLoader.class.getSimpleName() + " is required.");
-      }
-      if (implClassName == null || implClassName.length() == 0)
-      {
-         throw new IllegalArgumentException("Implementation class name must be specified");
-      }
-
-      // Get the server
-      final Server<?, ?> server = ServerFactory.createServer(implClassName, cl);
-
-      // Cast
-      final Class<JBossASServer> targetClass = JBossASServer.class;
-      JBossASServer asServer = null;
-      try
-      {
-         asServer = targetClass.cast(server);
-      }
-      catch (ClassCastException cce)
-      {
-         // Catch, explain giving some context, throw new
-         throw new ClassCastException("Specified server implementation class, " + implClassName
-               + " must be assignable to " + targetClass.getName());
-      }
-
-      // Set a default config
-      final JBossASServerConfig config = JBossASServerConfigFactory.createServerConfig(cl);
-      asServer.setConfiguration(config);
-
-      // Return
-      return asServer;
-   }
-
-   /**
-    * Creates a JBossASServer 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.
-    * 
-    * @throws IllegalArgumentException If the ClassLoader or server implementation class is null
-    * @throws Exception If there was an error in creating the Server
-    * @return The newly-created Server populated with a default configuration
-    */
-   public static JBossASServer createServerWithDefaultConfiguration(final String implClassName, final ClassLoader cl)
-         throws IllegalArgumentException, Exception
-   {
-      // Make the server, applying a default config
-      return applyDefaultConfiguration(createServer(implClassName, cl), cl);
-   }
-
-   //-------------------------------------------------------------------------------------||
-   // Internal Helper Methods ------------------------------------------------------------||
-   //-------------------------------------------------------------------------------------||
-
-   /**
-    * Sets a new, default configuration upon the specified server
-    * 
-    * @param server The server upon which we'll set a new config
-    * @param cl The ClassLoader used to create the new config
-    * @return The same server instance passed in, with a set config
-    */
-   private static JBossASServer applyDefaultConfiguration(final JBossASServer server, final ClassLoader cl)
-   {
-      // Set a default config
-      final JBossASServerConfig config = JBossASServerConfigFactory.createServerConfig(cl);
-      server.setConfiguration(config);
-      return server;
-   }
-}

Added: projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/server/JBossASServerProvider.java
===================================================================
--- projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/server/JBossASServerProvider.java	                        (rev 0)
+++ projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/server/JBossASServerProvider.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.bootstrap.spi.as.server;
+
+import org.jboss.bootstrap.api.as.server.JBossASServer;
+import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
+
+/**
+ * JBossASServer
+ * 
+ * Contract for implementations of JBossAS Servers
+ *
+ * @author Jason Dillon
+ * @author Scott.Stark at jboss.org
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface JBossASServerProvider
+      extends
+         JBossASBasedServerProvider<JBossASServer, JBossASServerConfig>,
+         JBossASServer
+{
+
+}

Deleted: projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/server/SecurityActions.java
===================================================================
--- projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/server/SecurityActions.java	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/spi-as/src/main/java/org/jboss/bootstrap/spi/as/server/SecurityActions.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -1,73 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.jboss.bootstrap.spi.as.server;
-
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-
-/**
- * SecurityActions
- * 
- * Utility class for security actions, so as to provide
- * some centralization without leaking privileged actions
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-class SecurityActions
-{
-
-   //-------------------------------------------------------------------------------------||
-   // Constructor ------------------------------------------------------------------------||
-   //-------------------------------------------------------------------------------------||
-
-   /**
-    * In place to prevent instanciation 
-    */
-   private SecurityActions()
-   {
-   }
-
-   //-------------------------------------------------------------------------------------||
-   // Utility Methods --------------------------------------------------------------------||
-   //-------------------------------------------------------------------------------------||
-
-   /**
-    * Obtains the Thread Context ClassLoader
-    * 
-    * @return
-    */
-   static ClassLoader getTccl()
-   {
-      return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>()
-      {
-
-         public ClassLoader run()
-         {
-            // Return the TCCL
-            return Thread.currentThread().getContextClassLoader();
-         }
-
-      });
-   }
-}

Modified: projects/bootstrap/trunk/spi-mc/src/main/java/org/jboss/bootstrap/spi/mc/server/MCBasedServer.java
===================================================================
--- projects/bootstrap/trunk/spi-mc/src/main/java/org/jboss/bootstrap/spi/mc/server/MCBasedServer.java	2009-07-30 18:40:27 UTC (rev 91839)
+++ projects/bootstrap/trunk/spi-mc/src/main/java/org/jboss/bootstrap/spi/mc/server/MCBasedServer.java	2009-07-30 18:56:05 UTC (rev 91840)
@@ -24,7 +24,7 @@
 
 import java.util.Map;
 
-import org.jboss.bootstrap.spi.mc.config.MCBasedServerConfig;
+import org.jboss.bootstrap.spi.config.ServerConfig;
 import org.jboss.bootstrap.spi.server.Server;
 import org.jboss.kernel.Kernel;
 import org.jboss.kernel.spi.deployment.KernelDeployment;
@@ -38,7 +38,7 @@
  * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
  * @version $Revision: $
  */
-public interface MCBasedServer<K extends MCBasedServer<K, T>, T extends MCBasedServerConfig<T>> extends Server<K, T>
+public interface MCBasedServer<K extends Server<K, T>, T extends ServerConfig<T>> extends Server<K, T>
 {
    //-------------------------------------------------------------------------------------||
    // Contracts --------------------------------------------------------------------------||




More information about the jboss-cvs-commits mailing list