User: squirest
Date: 02/02/25 18:03:00
Modified: src/main/org/jboss/mx/modelmbean XMBean.java
Log:
moved and removed stuff. new items will go into capability until a better home can
be found
Revision Changes Path
1.5 +30 -24 jmx/src/main/org/jboss/mx/modelmbean/XMBean.java
Index: XMBean.java
===================================================================
RCS file: /cvsroot/jboss/jmx/src/main/org/jboss/mx/modelmbean/XMBean.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- XMBean.java 26 Jan 2002 21:13:29 -0000 1.4
+++ XMBean.java 26 Feb 2002 02:03:00 -0000 1.5
@@ -27,10 +27,11 @@
import org.jboss.mx.metadata.XMLMetaData;
import org.jboss.mx.metadata.StandardMetaData;
+import org.jboss.mx.metadata.MBeanInfoConversion;
import org.jboss.mx.interceptor.ModelMBeanInterceptor;
public class XMBean
- extends ModelBase
+ extends ModelBase
implements MBeanRegistration, XMBeanConstants
{
@@ -50,18 +51,23 @@
{
try
{
- //if (resourceType.startsWith("CLASS_NAME"))
+ //if (resourceType.startsWith("CLASS_NAME"))
//{
- // String
- setManagedResource(resource, resourceType);
-
-
+ // String
+ setManagedResource(resource, resourceType);
+
+
if (resourceType.equals(STANDARD_INTERFACE))
- info = new ModelMBeanInfoSupport((ModelMBeanInfo)new
StandardMetaData(resource, true).build());
+ {
+ MBeanInfo standardInfo = new StandardMetaData(resource).build();
+ info = MBeanInfoConversion.toModelMBeanInfo(standardInfo);
+ }
if (resourceType.endsWith(".xml"))
- info = new ModelMBeanInfoSupport((ModelMBeanInfo)new
XMLMetaData(resource.getClass().getName(), resourceType).build());
+ {
+ info = new ModelMBeanInfoSupport((ModelMBeanInfo)new
XMLMetaData(resource.getClass().getName(), resourceType).build());
+ }
}
- catch (InstanceNotFoundException e)
+ catch (InstanceNotFoundException e)
{
throw new MBeanException(e);
}
@@ -69,66 +75,66 @@
{
if (resourceType.endsWith(".xml"))
throw new MBeanException(e, "Malformed URL: " + resourceType);
-
+
throw new MBeanException(e, "Unsupported resource type: " + resourceType);
}
catch (MalformedURLException e)
{
throw new MBeanException(e, "Malformed URL: " + resourceType);
- }
+ }
}
- public XMBean(String resourceClass, String resourceType, Object resourceInfo)
+ public XMBean(String resourceClass, String resourceType, Object resourceInfo)
throws MBeanException, NotCompliantMBeanException
{
-
-
+
+
}
-
+
// Public --------------------------------------------------------
public boolean isSupportedResourceType(String resourceType)
{
return true;
-
+
/*
if (resourceType == null)
return false;
-
+
StringTokenizer strTokenizer = new StringTokenizer(resourceType, "/");
String referenceType = strTokenizer.nextToken();
String interfaceType = "/" + strTokenizer.nextToken();
String resourceInfo = strTokenizer.nextToken();
-
+
if (referenceType.equals(OBJET_REF))
return true;
if (resourceType.equals(OBJECT_REF))
return true;
if (resourceType.equals(STANDARD_INTERFACE))
return true;
-
+
if (resourceType.endsWith(".xml"))
try
{
new URL(resourceType);
return true;
}
- catch (MalformedURLException e)
+ catch (MalformedURLException e)
{
return false;
}
-
+
return false;
*/
}
-
+
// DynamicMBean implementation -----------------------------------
public MBeanInfo getMBeanInfo()
{
return info;
}
-
-
+
+
}
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development