[Ejtools-cvs] applications/jmx.browser/src/main/org/ejtools/jmx/browser/model Node.java,1.1,1.2 Reso
Brought to you by:
letiemble
|
From: <let...@us...> - 2003-11-27 01:13:40
|
Update of /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/model
In directory sc8-pr-cvs1:/tmp/cvs-serv13614/jmx.browser/src/main/org/ejtools/jmx/browser/model
Modified Files:
Node.java Resource.java Server.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: Node.java
===================================================================
RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/model/Node.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Node.java 10 Feb 2003 20:49:26 -0000 1.1
--- Node.java 27 Nov 2003 01:13:07 -0000 1.2
***************
*** 40,44 ****
}
-
/**
* Getter for the className attribute
--- 40,43 ----
Index: Resource.java
===================================================================
RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/model/Resource.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Resource.java 1 Apr 2003 21:53:10 -0000 1.5
--- Resource.java 27 Nov 2003 01:13:07 -0000 1.6
***************
*** 26,29 ****
--- 26,30 ----
import org.ejtools.adwt.service.ConsoleService;
import org.ejtools.graph.service.GraphConsumer;
+ import org.ejtools.graph.service.GraphConsumerMediator;
import org.ejtools.graph.service.GraphProducer;
import org.ejtools.graph.service.GraphService;
***************
*** 39,44 ****
*
* @author letiemble
- * @created 13 décembre 2001
* @version $Revision$
* @todo Javadoc to complete
* @javabean:class displayName="JMX ManagedObject"
--- 40,45 ----
*
* @author letiemble
* @version $Revision$
+ * @created 13 d?cembre 2001
* @todo Javadoc to complete
* @javabean:class displayName="JMX ManagedObject"
***************
*** 72,76 ****
* expert="true"
*/
! public class Resource extends Node implements MBeanAccessor
{
/** Description of the Field */
--- 73,77 ----
* expert="true"
*/
! public class Resource extends Node implements MBeanAccessor, GraphConsumerMediator
{
/** Description of the Field */
***************
*** 230,233 ****
--- 231,245 ----
/**
+ * Gets the graphProducers attribute of the Resource object
+ *
+ * @return The graphProducers value
+ */
+ public Hashtable getGraphProducers()
+ {
+ return this.graphProducers;
+ }
+
+
+ /**
* Gets the mBeanInfo attribute of the ManagedObject object
*
***************
*** 449,472 ****
public void log(Throwable t)
{
! BeanContextServices context = (BeanContextServices) getBeanContext();
!
! if (context.hasService(ConsoleService.class))
! {
! try
! {
! ConsoleService service = (ConsoleService) context.getService(this, this, ConsoleService.class, this, this);
! StringWriter w = new StringWriter();
! PrintWriter pw = new PrintWriter(w);
! t.printStackTrace(pw);
! pw.close();
! this.log("Exception occured :");
! this.log(w.toString());
! context.releaseService(this, this, ConsoleService.class);
! }
! catch (Exception e)
! {
! logger.error("Error while logging", e);
! }
! }
}
--- 461,470 ----
public void log(Throwable t)
{
! StringWriter w = new StringWriter();
! PrintWriter pw = new PrintWriter(w);
! t.printStackTrace(pw);
! pw.close();
! this.log("Exception occured :");
! this.log(w.toString());
}
***************
*** 630,633 ****
--- 628,632 ----
{
ConnectionService service = (ConnectionService) context.getService(this, this, ConnectionService.class, this, this);
+ logger.debug("setAttribute(" + objectName + "," + attribute + ")");
service.getMBeanServer().setAttribute(objectName, attribute);
context.releaseService(this, this, ConnectionService.class);
Index: Server.java
===================================================================
RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/model/Server.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** Server.java 1 Apr 2003 21:53:10 -0000 1.6
--- Server.java 27 Nov 2003 01:13:07 -0000 1.7
***************
*** 24,27 ****
--- 24,28 ----
import org.ejtools.jmx.browser.model.service.ConnectionService;
import org.ejtools.util.service.Profile;
+ import org.ejtools.util.service.ProfileHolder;
/**
***************
*** 29,33 ****
*
* @author letiemble
- * @created 13 décembre 2001
* @version $Revision$
* @todo Javadoc to complete
--- 30,33 ----
***************
*** 72,77 ****
* displayName="Credentials"
* shortDescription="Credentials to connect"
*/
! public class Server extends Node
{
/** Description of the Field */
--- 72,81 ----
* displayName="Credentials"
* shortDescription="Credentials to connect"
+ * @javabean:property name="service"
+ * class="java.lang.String"
+ * displayName="Service URL"
+ * shortDescription="JMX Remoting Service URL beginning with 'service:jmx:'"
*/
! public class Server extends Node implements ProfileHolder
{
/** Description of the Field */
***************
*** 98,102 ****
* Description of the Method
*
- * @todo Use queryMBeans instance method instead direct call to service
* @javabean:method name="connect"
* displayName="Connect"
--- 102,105 ----
***************
*** 291,294 ****
--- 294,301 ----
}
+ public String getService()
+ {
+ return this.profile.getProperty(ConnectionMetaData.SERVICE);
+ }
/**
***************
*** 326,329 ****
--- 333,362 ----
/**
+ * Gets the connected attribute of the Server object
+ *
+ * @return The connected value
+ */
+ public boolean isConnected()
+ {
+ BeanContextServices context = (BeanContextServices) getBeanContext();
+ boolean result = false;
+ if (context.hasService(ConnectionService.class))
+ {
+ try
+ {
+ ConnectionService service = (ConnectionService) context.getService(this, this, ConnectionService.class, this, this);
+ result = service.isConnected();
+ context.releaseService(this, this, ConnectionService.class);
+ }
+ catch (Exception e)
+ {
+ logger.error("Error during utilisation of service ConnectionService", e);
+ }
+ }
+ return result;
+ }
+
+
+ /**
* Description of the Method
*
***************
*** 502,506 ****
public void setFactory(String factory)
{
! this.profile.setProperty(ConnectionMetaData.FACTORY, factory);
}
--- 535,544 ----
public void setFactory(String factory)
{
! this.profile.setProperty(ConnectionMetaData.FACTORY, factory);
! }
!
! public void setService(String service)
! {
! this.profile.setProperty(ConnectionMetaData.SERVICE, service);
}
|