[jboss-cvs] JBossAS SVN: r88965 - projects/integration/branches/5_x/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri May 15 20:07:10 EDT 2009
Author: scott.stark at jboss.org
Date: 2009-05-15 20:07:10 -0400 (Fri, 15 May 2009)
New Revision: 88965
Modified:
projects/integration/branches/5_x/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/KnownComponentTypes.java
projects/integration/branches/5_x/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/ManagementView.java
Log:
JBAS-6911
- Add a method to get the list of all ComponentTypes under the current profiles
- Add a KnownComponentTypes.ANY type
Modified: projects/integration/branches/5_x/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/KnownComponentTypes.java
===================================================================
--- projects/integration/branches/5_x/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/KnownComponentTypes.java 2009-05-15 23:27:00 UTC (rev 88964)
+++ projects/integration/branches/5_x/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/KnownComponentTypes.java 2009-05-16 00:07:10 UTC (rev 88965)
@@ -31,14 +31,30 @@
*/
public interface KnownComponentTypes
{
+ // constants for well known subtypes
+ public static final String ANY = "*";
+ public static final String XA = "XA";
+ public static final String LOCAL_TX = "LocalTx";
+ public static final String NO_TX = "NoTx";
+ public static final String TX = "Tx";
+ public static final String QUEUE = "Queue";
+ public static final String TOPIC = "Topic";
+ public static final String DURABLE = "DurableTopic";
+
+
/**
+ * A component type that should match any other
+ */
+ public static ComponentType ANY_TYPE = new ComponentType(ANY, ANY);
+
+ /**
* Enums for the DataSource types
*/
public enum DataSourceTypes
{
- XA("DataSource", "XA"),
- LocalTx("DataSource", "LocalTx"),
- NoTx("DataSource", "NoTx");
+ XA("DataSource", KnownComponentTypes.XA),
+ LocalTx("DataSource", LOCAL_TX),
+ NoTx("DataSource", NO_TX);
private final String type;
private final String subtype;
@@ -70,15 +86,15 @@
/**
* @deprecated use {@link #Tx}
*/
- XA("ConnectionFactory", "XA"),
+ XA("ConnectionFactory", KnownComponentTypes.XA),
/**
* A transacted connection factory
*/
- Tx("ConnectionFactory", "Tx"),
+ Tx("ConnectionFactory", TX),
/**
* A connection factory that does not support transactions
*/
- NoTx("ConnectionFactory", "NoTx");
+ NoTx("ConnectionFactory", NO_TX);
private final String type;
private final String subtype;
@@ -170,12 +186,13 @@
*/
public enum MBean
{
- Dynamic("MBean", "StatelessSession"),
+ Dynamic("MBean", "Dynamic"),
Standard("MBean", "Standard"),
Model("MBean", "Model"),
Open("MBean", "Open"),
Persistent("MBean", "Persistent"),
- XMBean("MBean", "XMBean");
+ XMBean("MBean", "XMBean"),
+ Platform("MBean", "Platform");
private final String type;
private final String subtype;
@@ -227,4 +244,71 @@
return new ComponentType(type, subtype);
}
}
+
+ /**
+ * Enums for the web component types
+ */
+ public enum Web
+ {
+ Application("Web", "Application"),
+ ApplicationManager("Web", "ApplicationManager"),
+ Connector("Web", "Connector"),
+ Filter("Web", "Filter"),
+ Host("Web", "Host"),
+ Listener("Web", "Listener"),
+ RequestProcessor("Web", "RequestProcessor"),
+ ThreadPool("Web", "ThreadPool"),
+ Servlet("Web", "Servlet");
+
+ private final String type;
+ private final String subtype;
+ private Web(String type, String subtype)
+ {
+ this.type = type;
+ this.subtype = subtype;
+ }
+
+ public String type()
+ {
+ return type;
+ }
+ public String subtype()
+ {
+ return subtype;
+ }
+ public ComponentType getType()
+ {
+ return new ComponentType(type, subtype);
+ }
+ }
+ /**
+ * Enums for Server component types
+ */
+ public enum Server
+ {
+ ServerInfo("Server", "ServerInfo"),
+ ServerConfig("Server", "ServerConfig"),
+ MCServer("Server", "MCServer");
+
+ private final String type;
+ private final String subtype;
+ private Server(String type, String subtype)
+ {
+ this.type = type;
+ this.subtype = subtype;
+ }
+
+ public String type()
+ {
+ return type;
+ }
+ public String subtype()
+ {
+ return subtype;
+ }
+ public ComponentType getType()
+ {
+ return new ComponentType(type, subtype);
+ }
+ }
}
Modified: projects/integration/branches/5_x/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/ManagementView.java
===================================================================
--- projects/integration/branches/5_x/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/ManagementView.java 2009-05-15 23:27:00 UTC (rev 88964)
+++ projects/integration/branches/5_x/jboss-profileservice-spi/src/main/java/org/jboss/deployers/spi/management/ManagementView.java 2009-05-16 00:07:10 UTC (rev 88965)
@@ -109,6 +109,12 @@
throws Exception;
/**
+ * Get a set of the component types in use in the profiles
+ * @return set of component types in use
+ */
+ Set<ComponentType> getComponentTypes();
+
+ /**
* Get the components of a type.
*
* @param type - the component type.
More information about the jboss-cvs-commits
mailing list