[jboss-cvs] JBossAS SVN: r88177 - in projects/bootstrap/trunk: impl-base/src/main/java/org/jboss/bootstrap/impl/base/server and 2 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon May 4 22:14:45 EDT 2009


Author: ALRubinger
Date: 2009-05-04 22:14:45 -0400 (Mon, 04 May 2009)
New Revision: 88177

Modified:
   projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/server/JBossASServerInitializer.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/TestServerInitializer.java
   projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/server/ServerInitializer.java
Log:
[JBBOOT-64] Fix generics on ServerInitializer to accept the parameterized server type

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-05-05 00:34:26 UTC (rev 88176)
+++ projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/server/JBossASServerInitializer.java	2009-05-05 02:14:45 UTC (rev 88177)
@@ -30,7 +30,6 @@
 import org.jboss.bootstrap.impl.base.server.AbstractBasicServerInitializer;
 import org.jboss.bootstrap.spi.as.config.JBossASServerConfig;
 import org.jboss.bootstrap.spi.as.server.JBossASServer;
-import org.jboss.bootstrap.spi.server.Server;
 import org.jboss.bootstrap.spi.server.ServerInitializer;
 import org.jboss.logging.Logger;
 
@@ -59,8 +58,7 @@
     * @see org.jboss.bootstrap.spi.server.AbstractBasicServerInitializer#initialize(org.jboss.bootstrap.spi.server.Server)
     */
    @Override
-   public void initialize(Server<JBossASServer, JBossASServerConfig> server) throws IllegalArgumentException,
-         IllegalStateException
+   public void initialize(JBossASServer server) throws IllegalArgumentException, IllegalStateException
    {
       // Log
       if (log.isTraceEnabled())

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-05-05 00:34:26 UTC (rev 88176)
+++ projects/bootstrap/trunk/impl-base/src/main/java/org/jboss/bootstrap/impl/base/server/AbstractBasicServerInitializer.java	2009-05-05 02:14:45 UTC (rev 88177)
@@ -63,8 +63,7 @@
    /* (non-Javadoc)
     * @see org.jboss.bootstrap.spi.server.ServerInitializer#initialize(org.jboss.bootstrap.spi.server.Server)
     */
-   public synchronized void initialize(final Server<K, T> server) throws IllegalArgumentException,
-         IllegalStateException
+   public synchronized void initialize(final K server) throws IllegalArgumentException, IllegalStateException
    {
       // Log
       if (log.isTraceEnabled())
@@ -101,10 +100,11 @@
 
    }
 
-   /* (non-Javadoc)
+   /*
+    * (non-Javadoc)
     * @see org.jboss.bootstrap.spi.server.ServerInitializer#cleanup(org.jboss.bootstrap.spi.server.Server)
     */
-   public synchronized void cleanup(final Server<K, T> server) throws IllegalArgumentException, IllegalStateException
+   public synchronized void cleanup(final K server) throws IllegalArgumentException, IllegalStateException
    {
       // Log
       if (log.isTraceEnabled())
@@ -160,7 +160,7 @@
       final String string = value != null ? value.toString() : "";
       this.setSystemProperty(key, string == null ? null : string);
    }
-   
+
    /**
     * Sets the specified Boolean as a system property with the specified key
     * 

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-05-05 00:34:26 UTC (rev 88176)
+++ projects/bootstrap/trunk/impl-base/src/main/java/org/jboss/bootstrap/impl/base/server/AbstractServer.java	2009-05-05 02:14:45 UTC (rev 88177)
@@ -278,7 +278,7 @@
          {
             log.trace("Calling to clean up for shutdown: " + serverInitializer);
          }
-         serverInitializer.cleanup(this);
+         serverInitializer.cleanup(this.covarientReturn());
       }
 
       // Send JMX Notification
@@ -440,7 +440,7 @@
       final ServerInitializer<K, T> serverInitializer = this.getServerInitializer();
       if (serverInitializer != null)
       {
-         serverInitializer.initialize(this);
+         serverInitializer.initialize(this.covarientReturn());
       }
       else
       {

Modified: projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/config/TestServerInitializer.java
===================================================================
--- projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/config/TestServerInitializer.java	2009-05-05 00:34:26 UTC (rev 88176)
+++ projects/bootstrap/trunk/impl-base/src/test/java/org/jboss/bootstrap/impl/base/config/TestServerInitializer.java	2009-05-05 02:14:45 UTC (rev 88177)
@@ -26,9 +26,7 @@
 
 import org.jboss.bootstrap.impl.base.server.AbstractBasicServerInitializer;
 import org.jboss.bootstrap.impl.base.server.TestNoOpServer;
-import org.jboss.bootstrap.spi.server.Server;
 
-
 /**
  * TestServerInitializer
  * 
@@ -70,8 +68,7 @@
    /* (non-Javadoc)
     * @see org.jboss.bootstrap.spi.server.ServerInitializer#initialize(org.jboss.bootstrap.spi.server.Server)
     */
-   public void initialize(Server<TestNoOpServer, TestServerConfig> server) throws IllegalArgumentException,
-         IllegalStateException
+   public void initialize(TestNoOpServer server) throws IllegalArgumentException, IllegalStateException
    {
       // Increment counter
       this.count.incrementAndGet();

Modified: 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-05-05 00:34:26 UTC (rev 88176)
+++ projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/server/ServerInitializer.java	2009-05-05 02:14:45 UTC (rev 88177)
@@ -47,7 +47,7 @@
     * @throws IllegalStateException If the server's state is not 
     *       {@link LifecycleState#PRE_INIT}
     */
-   void initialize(Server<K, T> server) throws IllegalArgumentException, IllegalStateException;
+   void initialize(K server) throws IllegalArgumentException, IllegalStateException;
 
    /**
     * Cleans up any actions taken during the initialization phase
@@ -57,5 +57,5 @@
     * @throws IllegalArgumentException
     * @throws IllegalStateException If the server's state is not {@link LifecycleState#STOPPING}
     */
-   void cleanup(Server<K, T> server) throws IllegalArgumentException, IllegalStateException;
+   void cleanup(K server) throws IllegalArgumentException, IllegalStateException;
 }




More information about the jboss-cvs-commits mailing list