santillan wrote:
Yep,
Adding mbeans is fairly easy. I am not very much aware of UPnP -yet :-)- but
I understand that you do not know a priori which is the interface.
Well the UPnP Forum standardizes several types of UPnP Device so in
principle the interface is known a priori. But I was thinking to a
service that listens for every installed UPnP device and register
dynamilly a new MBean. For such reason I was thinking to adopt a dynamic
bean. But as written in the previous message I'm not sure it is the
right approach, I'm not very much aware of JMX too ;-)
francesco
If so,
the simplest approach is to use the StandardMBean class:
Class interface=//get your management interface class
StandardMBean myMBean=new StandardMBean(impl, interface);
ObjectName oname=ObjectName.getInstance("<This string should contain a valid
objectname, in the form 'domain:key1=value1[, key2=value2...]'>");
ManagementFactory.getPlatformMBeanServer.registerMBean(myBean, objectName);
And when exiting,
ManagementFactory.getPlatformMBeanServer.unRegisterMBean(objectName);
--
Manuel Santillán <[EMAIL PROTECTED]>
http://www.dit.upm.es/santillan
Departamento de Ingeniería de Sistemas Telemáticos
Escuela Técnica Superior de Ingenieros de Telecomunicación
Universidad Politécnica de Madrid
Avda. Complutense, s/n
28040 Madrid SPAIN
Tel. +34 913367366 ext.3034
-----Mensaje original-----
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Enviado el: viernes, 15 de septiembre de 2006 10:12
Para: [email protected]
Asunto: Re: JMX and UPnP
Yes that's it.
You can have two implementing ways :
- UPnPdev <-> MBean <-> JMXConsole
In this case each UPnP device declares an MBean which represent
himself. So the JMXConsole can be considered as a controlPoint
- UPnPdev <-> ControlPoint <-> MBean <-> JMXconsole
In this case the control point declares a MBean that enable the
JMXConsole to manage it.
I have done the second one in a simple example.
/stephane
On Fri, Sep 15, 2006 at 09:40:15AM +0200, Francesco Furfari wrote:
The question I don't understand is if you want to do some UPnP control
point out of JMX ?
/stephane
I'm not sure to understand your question. Are you asking if I want to
create a new GUI (Tab) for your console acting as a Generic Control
Point, that is similar to GUI of the bundle we have developed for
testing UPnP?
or the question is about bridging two local UPnP networks ?
francesco