[Ejtools-cvs] applications/jmx.browser/src/main/org/ejtools/jmx/browser/web Constants.java,1.1,1.2 J
Brought to you by:
letiemble
|
From: <let...@us...> - 2003-11-27 01:13:11
|
Update of /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/web In directory sc8-pr-cvs1:/tmp/cvs-serv13614/jmx.browser/src/main/org/ejtools/jmx/browser/web Modified Files: Constants.java JMXContainer.java QueryConstants.java Log Message: Address Bug #775745 Address Todo #800902 Address Todo #755528 Remove @created tags Add support for MXJ4 2.0.0 (still beta) Add support for JXM Remoting through RMI Index: Constants.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/web/Constants.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Constants.java 10 Feb 2003 20:49:41 -0000 1.1 --- Constants.java 27 Nov 2003 01:13:07 -0000 1.2 *************** *** 1,46 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.web; ! ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 28 février 2002 ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public final class Constants ! { ! /** Description of the Field */ ! public final static String CONNECTOR = "tree"; ! /** Description of the Field */ ! public final static String CUSTOM_VIEW = "custom.view"; ! /** Description of the Field */ ! public final static String CUSTOM_VIEW_ATTRIBUTES = "custom.view.attributes"; ! /** Description of the Field */ ! public final static String CUSTOM_VIEW_INDEX = "custom.view.index"; ! /** Description of the Field */ ! public final static String CUSTOM_VIEW_OPERATIONS = "custom.view.operations"; ! /** Description of the Field */ ! public final static String DETAIL = "detail"; ! /** Description of the Field */ ! public final static String DETAIL_INFO = "detail.info"; ! /** Description of the Field */ ! public final static String DOMAIN = "domain"; ! /** Description of the Field */ ! public final static String INVOCATION_RESULT = "invoke.result"; ! /** Description of the Field */ ! public final static String NUMBER = "number"; ! /** Description of the Field */ ! public final static int RECORD_PER_PAGE = 50; ! /** Description of the Field */ ! public final static String SEARCH_RESULT = "search.result"; ! /** Description of the Field */ ! public final static String TREE = "tree"; ! } --- 1,46 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.web; ! ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 28 février 2002 ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public final class Constants ! { ! /** Description of the Field */ ! public final static String CONNECTOR = "tree"; ! /** Description of the Field */ ! public final static String CUSTOM_VIEW = "custom.view"; ! /** Description of the Field */ ! public final static String CUSTOM_VIEW_ATTRIBUTES = "custom.view.attributes"; ! /** Description of the Field */ ! public final static String CUSTOM_VIEW_INDEX = "custom.view.index"; ! /** Description of the Field */ ! public final static String CUSTOM_VIEW_OPERATIONS = "custom.view.operations"; ! /** Description of the Field */ ! public final static String DETAIL = "detail"; ! /** Description of the Field */ ! public final static String DETAIL_INFO = "detail.info"; ! /** Description of the Field */ ! public final static String DOMAIN = "domain"; ! /** Description of the Field */ ! public final static String INVOCATION_RESULT = "invoke.result"; ! /** Description of the Field */ ! public final static String NUMBER = "number"; ! /** Description of the Field */ ! public final static int RECORD_PER_PAGE = 50; ! /** Description of the Field */ ! public final static String SEARCH_RESULT = "search.result"; ! /** Description of the Field */ ! public final static String TREE = "tree"; ! } Index: JMXContainer.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/web/JMXContainer.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** JMXContainer.java 10 Feb 2003 20:49:41 -0000 1.1 --- JMXContainer.java 27 Nov 2003 01:13:07 -0000 1.2 *************** *** 1,209 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.web; ! ! import java.beans.beancontext.BeanContextServicesSupport; ! import java.util.Collection; ! import java.util.Set; ! ! import javax.management.ObjectInstance; ! import javax.management.ObjectName; ! import javax.management.QueryExp; ! ! import org.ejtools.jmx.browser.mbean.View; ! import org.ejtools.jmx.browser.model.Resource; ! import org.ejtools.jmx.browser.model.Server; ! import org.ejtools.jmx.browser.model.service.CacheService; ! import org.ejtools.jmx.browser.model.service.CacheServiceProvider; ! import org.ejtools.jmx.browser.model.service.ConnectionServiceProvider; ! import org.ejtools.jmx.browser.model.service.CustomizationServiceProvider; ! import org.ejtools.jmx.browser.model.service.NotificationServiceProvider; ! ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 25 avril 2002 ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public class JMXContainer extends BeanContextServicesSupport ! { ! /** Description of the Field */ ! protected CacheServiceProvider cacheProvider; ! /** Description of the Field */ ! protected ConnectionServiceProvider connectionProvider; ! /** Description of the Field */ ! protected CustomizationServiceProvider customizationProvider; ! /** Description of the Field */ ! protected NotificationServiceProvider notificationProvider; ! /** Description of the Field */ ! protected Server server; ! ! ! /** Constructor for the JMXTree object */ ! public JMXContainer() ! { ! try ! { ! this.connectionProvider = new ConnectionServiceProvider(); ! this.notificationProvider = new NotificationServiceProvider(); ! this.cacheProvider = new CacheServiceProvider(); ! this.customizationProvider = new CustomizationServiceProvider(); ! this.server = new Server(); ! ! this.add(this.cacheProvider); ! this.add(this.connectionProvider); ! this.add(this.notificationProvider); ! this.add(this.customizationProvider); ! this.add(this.server); ! } ! catch (Exception e) ! { ! e.printStackTrace(); ! } ! } ! ! ! /** Description of the Method */ ! public void clearNotifications() ! { ! this.notificationProvider.clearAll(); ! } ! ! ! /** ! * Description of the Method ! * ! * @param className Description of the Parameter ! * @param name Description of the Parameter ! * @param loaderName Description of the Parameter ! * @param params Description of the Parameter ! * @param signature Description of the Parameter ! * @return Description of the Return Value ! * @exception Exception Description of the Exception ! */ ! public ObjectInstance createMBean(java.lang.String className, ObjectName name, ObjectName loaderName, java.lang.Object[] params, java.lang.String[] signature) ! throws Exception ! { ! return this.server.createMBean(className, name, loaderName, params, signature); ! } ! ! ! /** ! * Getter for the count attribute ! * ! * @return The value of count attribute ! */ ! public int getCount() ! { ! return this.server.getCount(); ! } ! ! ! /** ! * Getter for the defaultDomain attribute ! * ! * @return The value of defaultDomain attribute ! */ ! public String getDefaultDomain() ! { ! return this.server.getDefaultDomain(); ! } ! ! ! /** ! * Gets the notifications attribute of the JMXContainer object ! * ! * @return The notifications value ! */ ! public Collection getNotifications() ! { ! return this.notificationProvider.listAll(); ! } ! ! ! /** ! * Getter for the server attribute ! * ! * @return The value of server attribute ! */ ! public Collection getServer() ! { ! return this.server; ! } ! ! ! /** ! * Gets the view attribute of the JMXContainer object ! * ! * @param index Description of the Parameter ! * @return The view value ! */ ! public View getView(int index) ! { ! return this.customizationProvider.getView(index); ! } ! ! ! /** ! * Gets the views attribute of the JMXContainer object ! * ! * @return The views value ! */ ! public Collection getViews() ! { ! return this.customizationProvider.getViews(); ! } ! ! ! /** ! * Description of the Method ! * ! * @param name Description of the Parameter ! * @param exp Description of the Parameter ! * @return Description of the Return Value ! * @exception Exception Description of the Exception ! */ ! public Set query(ObjectName name, QueryExp exp) ! throws Exception ! { ! return this.server.query(name, exp); ! } ! ! ! /** Description of the Method */ ! public void refresh() ! { ! this.server.refresh(); ! } ! ! ! /** ! * Description of the Method ! * ! * @param objectName Description of the Parameter ! * @return Description of the Return Value ! */ ! public Object searchObjectName(String objectName) ! { ! Resource resource = (Resource) this.cacheProvider.get(CacheService.RESOURCE_TYPE, objectName); ! try ! { ! if ((resource != null) && (resource.isRegistered())) ! { ! return resource; ! } ! } ! catch (Exception e) ! { ! e.printStackTrace(); ! } ! return null; ! } ! } --- 1,209 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.web; ! ! import java.beans.beancontext.BeanContextServicesSupport; ! import java.util.Collection; ! import java.util.Set; ! ! import javax.management.ObjectInstance; ! import javax.management.ObjectName; ! import javax.management.QueryExp; ! ! import org.ejtools.jmx.browser.mbean.View; ! import org.ejtools.jmx.browser.model.Resource; ! import org.ejtools.jmx.browser.model.Server; ! import org.ejtools.jmx.browser.model.service.CacheService; ! import org.ejtools.jmx.browser.model.service.CacheServiceProvider; ! import org.ejtools.jmx.browser.model.service.ConnectionServiceProvider; ! import org.ejtools.jmx.browser.model.service.CustomizationServiceProvider; ! import org.ejtools.jmx.browser.model.service.NotificationServiceProvider; ! ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 25 avril 2002 ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public class JMXContainer extends BeanContextServicesSupport ! { ! /** Description of the Field */ ! protected CacheServiceProvider cacheProvider; ! /** Description of the Field */ ! protected ConnectionServiceProvider connectionProvider; ! /** Description of the Field */ ! protected CustomizationServiceProvider customizationProvider; ! /** Description of the Field */ ! protected NotificationServiceProvider notificationProvider; ! /** Description of the Field */ ! protected Server server; ! ! ! /** Constructor for the JMXTree object */ ! public JMXContainer() ! { ! try ! { ! this.connectionProvider = new ConnectionServiceProvider(); ! this.notificationProvider = new NotificationServiceProvider(); ! this.cacheProvider = new CacheServiceProvider(); ! this.customizationProvider = new CustomizationServiceProvider(); ! this.server = new Server(); ! ! this.add(this.cacheProvider); ! this.add(this.connectionProvider); ! this.add(this.notificationProvider); ! this.add(this.customizationProvider); ! this.add(this.server); ! } ! catch (Exception e) ! { ! e.printStackTrace(); ! } ! } ! ! ! /** Description of the Method */ ! public void clearNotifications() ! { ! this.notificationProvider.clearAll(); ! } ! ! ! /** ! * Description of the Method ! * ! * @param className Description of the Parameter ! * @param name Description of the Parameter ! * @param loaderName Description of the Parameter ! * @param params Description of the Parameter ! * @param signature Description of the Parameter ! * @return Description of the Return Value ! * @exception Exception Description of the Exception ! */ ! public ObjectInstance createMBean(java.lang.String className, ObjectName name, ObjectName loaderName, java.lang.Object[] params, java.lang.String[] signature) ! throws Exception ! { ! return this.server.createMBean(className, name, loaderName, params, signature); ! } ! ! ! /** ! * Getter for the count attribute ! * ! * @return The value of count attribute ! */ ! public int getCount() ! { ! return this.server.getCount(); ! } ! ! ! /** ! * Getter for the defaultDomain attribute ! * ! * @return The value of defaultDomain attribute ! */ ! public String getDefaultDomain() ! { ! return this.server.getDefaultDomain(); ! } ! ! ! /** ! * Gets the notifications attribute of the JMXContainer object ! * ! * @return The notifications value ! */ ! public Collection getNotifications() ! { ! return this.notificationProvider.listAll(); ! } ! ! ! /** ! * Getter for the server attribute ! * ! * @return The value of server attribute ! */ ! public Collection getServer() ! { ! return this.server; ! } ! ! ! /** ! * Gets the view attribute of the JMXContainer object ! * ! * @param index Description of the Parameter ! * @return The view value ! */ ! public View getView(int index) ! { ! return this.customizationProvider.getView(index); ! } ! ! ! /** ! * Gets the views attribute of the JMXContainer object ! * ! * @return The views value ! */ ! public Collection getViews() ! { ! return this.customizationProvider.getViews(); ! } ! ! ! /** ! * Description of the Method ! * ! * @param name Description of the Parameter ! * @param exp Description of the Parameter ! * @return Description of the Return Value ! * @exception Exception Description of the Exception ! */ ! public Set query(ObjectName name, QueryExp exp) ! throws Exception ! { ! return this.server.query(name, exp); ! } ! ! ! /** Description of the Method */ ! public void refresh() ! { ! this.server.refresh(); ! } ! ! ! /** ! * Description of the Method ! * ! * @param objectName Description of the Parameter ! * @return Description of the Return Value ! */ ! public Object searchObjectName(String objectName) ! { ! Resource resource = (Resource) this.cacheProvider.get(CacheService.RESOURCE_TYPE, objectName); ! try ! { ! if ((resource != null) && (resource.isRegistered())) ! { ! return resource; ! } ! } ! catch (Exception e) ! { ! e.printStackTrace(); ! } ! return null; ! } ! } Index: QueryConstants.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/web/QueryConstants.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** QueryConstants.java 10 Feb 2003 20:49:41 -0000 1.1 --- QueryConstants.java 27 Nov 2003 01:13:07 -0000 1.2 *************** *** 1,75 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.web; ! ! import java.io.Serializable; ! import java.util.Collection; ! import java.util.Vector; ! ! /** ! * @author letiemble ! * @created 2 janvier 2002 ! * @version $Revision$ ! */ ! public class QueryConstants implements Serializable ! { ! /** Description of the Field */ ! protected Vector queries; ! /** Description of the Field */ ! protected Vector types; ! ! ! /** Constructor for the SearchTypeEditor object */ ! public QueryConstants() ! { ! types = new Vector(); ! types.add("java.lang.String"); ! types.add("java.lang.Integer"); ! types.add("java.lang.Long"); ! types.add("java.lang.Float"); ! types.add("java.lang.Double"); ! types.add("java.lang.Boolean"); ! ! types.add("byte"); ! types.add("short"); ! types.add("int"); ! types.add("long"); ! types.add("float"); ! types.add("double"); ! types.add("boolean"); ! ! queries = new Vector(); ! queries.add("="); ! queries.add(">"); ! queries.add(">="); ! queries.add("<"); ! queries.add("<="); ! } ! ! ! /** ! * Gets the values attribute of the SearchTypeConstants object ! * ! * @return The values value ! */ ! public Collection getQueries() ! { ! return this.queries; ! } ! ! ! /** ! * Gets the labels attribute of the SearchTypeConstants object ! * ! * @return The labels value ! */ ! public Collection getTypes() ! { ! return this.types; ! } ! } ! --- 1,75 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.web; ! ! import java.io.Serializable; ! import java.util.Collection; ! import java.util.Vector; ! ! /** ! * @author letiemble ! * @created 2 janvier 2002 ! * @version $Revision$ ! */ ! public class QueryConstants implements Serializable ! { ! /** Description of the Field */ ! protected Vector queries; ! /** Description of the Field */ ! protected Vector types; ! ! ! /** Constructor for the SearchTypeEditor object */ ! public QueryConstants() ! { ! types = new Vector(); ! types.add("java.lang.String"); ! types.add("java.lang.Integer"); ! types.add("java.lang.Long"); ! types.add("java.lang.Float"); ! types.add("java.lang.Double"); ! types.add("java.lang.Boolean"); ! ! types.add("byte"); ! types.add("short"); ! types.add("int"); ! types.add("long"); ! types.add("float"); ! types.add("double"); ! types.add("boolean"); ! ! queries = new Vector(); ! queries.add("="); ! queries.add(">"); ! queries.add(">="); ! queries.add("<"); ! queries.add("<="); ! } ! ! ! /** ! * Gets the values attribute of the SearchTypeConstants object ! * ! * @return The values value ! */ ! public Collection getQueries() ! { ! return this.queries; ! } ! ! ! /** ! * Gets the labels attribute of the SearchTypeConstants object ! * ! * @return The labels value ! */ ! public Collection getTypes() ! { ! return this.types; ! } ! } ! |