[Jboss-cvs] JBossAS SVN: r55473 - branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/system/server

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Aug 9 23:19:15 EDT 2006


Author: scott.stark at jboss.org
Date: 2006-08-09 23:19:13 -0400 (Wed, 09 Aug 2006)
New Revision: 55473

Modified:
   branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/system/server/ServerConfigImpl.java
Log:
Rewrite as an mbean wrapper for the BaseServerConfig that exposes the config as the legacy ServerConfigImplMBean.

Modified: branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/system/server/ServerConfigImpl.java
===================================================================
--- branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/system/server/ServerConfigImpl.java	2006-08-10 03:09:32 UTC (rev 55472)
+++ branches/MC_VDF_WORK/system-jmx/src/main/org/jboss/system/server/ServerConfigImpl.java	2006-08-10 03:19:13 UTC (rev 55473)
@@ -22,51 +22,170 @@
 package org.jboss.system.server;
 
 import java.io.File;
-import java.io.IOException;
 import java.net.MalformedURLException;
 import java.net.URL;
-import java.util.Properties;
 
-import org.jboss.util.NestedRuntimeException;
-import org.jboss.util.Null;
-import org.jboss.util.Primitives;
-import org.jboss.util.platform.Java;
-
 /**
- * A container for the basic configuration elements required to create
- * a Server instance.
- *
- * <p>MalformedURLException are rethrown as NestedRuntimeExceptions, so that
- *    code that needs to access these values does not have to directly
- *    worry about problems with lazy construction of final URL values.
- *
- * <p>Most values are determined durring first call to getter.  All values
- *    when determined will have equivilent system properties set.
- *
- * <p>Clients are not meant to use this class directly.  Instead use
- *    {@link ServerConfigLocator} to get an instance of {@link ServerConfig}
- *    and then use it to get the server's configuration bits.
- *
- * @jmx:mbean name="jboss.system:type=ServerConfig"
- *
- * @author <a href="mailto:jason at planet57.com">Jason Dillon</a>
- * @author <a href="mailto:dimitris at jboss.org">Dimitris Andreadis</a>
+ * An mbean wrapper for the BaseServerConfig that exposes the config as the
+ * legacy ServerConfigImplMBean.
+ * 
  * @author Scott.Stark at jboss.org
- * @version <tt>$Revision$</tt>
+ * @version $Revision$
  */
-public class ServerConfigImpl extends BaseServerConfig
+public class ServerConfigImpl
       implements ServerConfigImplMBean
 {
+   private BaseServerConfig config;
+
    /**
-    * Construct a new <tt>ServerConfigImpl</tt> instance.
+    * Construct a ServerConfigImpl with the BaseServerConfig which will be used
+    * as the delegate for the ServerConfigImplMBean ops.
     *
-    * @param props    Configuration properties.
-    *
-    * @throws Exception    Missing or invalid configuration.
+    * @param config - the BaseServerConfig pojo to expose as a ServerConfigImplMBean
     */
-   public ServerConfigImpl(final Properties props) throws Exception
+   public ServerConfigImpl(BaseServerConfig config)
    {
-      super(props);
+      this.config = config;
    }
 
+   public boolean equals(Object obj)
+   {
+      return config.equals(obj);
+   }
+
+   public boolean getBlockingShutdown()
+   {
+      return config.getBlockingShutdown();
+   }
+
+   public boolean getExitOnShutdown()
+   {
+      return config.getExitOnShutdown();
+   }
+
+   public File getHomeDir()
+   {
+      return config.getHomeDir();
+   }
+
+   public URL getHomeURL()
+   {
+      return config.getHomeURL();
+   }
+
+   public URL getLibraryURL()
+   {
+      return config.getLibraryURL();
+   }
+
+   public URL getPatchURL()
+   {
+      return config.getPatchURL();
+   }
+
+   public boolean getPlatformMBeanServer()
+   {
+      return config.getPlatformMBeanServer();
+   }
+
+   public boolean getRequireJBossURLStreamHandlerFactory()
+   {
+      return config.getRequireJBossURLStreamHandlerFactory();
+   }
+
+   public String getRootDeploymentFilename()
+   {
+      return config.getRootDeploymentFilename();
+   }
+
+   public File getServerBaseDir()
+   {
+      return config.getServerBaseDir();
+   }
+
+   public URL getServerBaseURL()
+   {
+      return config.getServerBaseURL();
+   }
+
+   public URL getServerConfigURL()
+   {
+      return config.getServerConfigURL();
+   }
+
+   public File getServerDataDir()
+   {
+      return config.getServerDataDir();
+   }
+
+   public File getServerHomeDir()
+   {
+      return config.getServerHomeDir();
+   }
+
+   public URL getServerHomeURL()
+   {
+      return config.getServerHomeURL();
+   }
+
+   public URL getServerLibraryURL()
+   {
+      return config.getServerLibraryURL();
+   }
+
+   public File getServerLogDir()
+   {
+      return config.getServerLogDir();
+   }
+
+   public String getServerName()
+   {
+      return config.getServerName();
+   }
+
+   public File getServerNativeDir()
+   {
+      return config.getServerNativeDir();
+   }
+
+   public File getServerTempDeployDir()
+   {
+      return config.getServerTempDeployDir();
+   }
+
+   public File getServerTempDir()
+   {
+      return config.getServerTempDir();
+   }
+
+   public int hashCode()
+   {
+      return config.hashCode();
+   }
+
+   public void initURLs() throws MalformedURLException
+   {
+      config.initURLs();
+   }
+
+   public void setBlockingShutdown(boolean flag)
+   {
+      config.setBlockingShutdown(flag);
+   }
+
+   public void setExitOnShutdown(boolean flag)
+   {
+      config.setExitOnShutdown(flag);
+   }
+
+   public void setRequireJBossURLStreamHandlerFactory(boolean flag)
+   {
+      config.setRequireJBossURLStreamHandlerFactory(flag);
+   }
+
+   public void setRootDeploymentFilename(String filename)
+   {
+      config.setRootDeploymentFilename(filename);
+   }
+
 }




More information about the jboss-cvs-commits mailing list