net.sbbi.upnp.jmx
Class UPNPMBeanDevice
java.lang.Object
net.sbbi.upnp.jmx.UPNPMBeanDevice
public class UPNPMBeanDevice
- extends Object
This class can be used to expose a JMX MBean as an UPNP device.
The MBeans methods names and params obtained via the MBeanInfo Object
will be used to create the UPNP device operations set, and the UPNP devie state variables
will be obtained from the MBeans attributes.
STILL A WORK IN PROGRESS MUST BE CONSIDERED AS BETA QUALITY SOFTWARE
doc net.sbbi.upnp.UPNPMBeanDevice.boundAddr sys prop
- Version:
- 1.0
- Author:
- SuperBonBon
|
Constructor Summary |
UPNPMBeanDevice(String deviceType,
int deviceVersion,
String manufacturer,
String friendlyName,
String modelName,
String internalId)
|
UPNPMBeanDevice(String vendorDomain,
String deviceType,
int deviceVersion,
String manufacturer,
String friendlyName,
String modelName,
String internalId)
|
|
Method Summary |
void |
addChildMBean(UPNPMBeanDevice device)
|
void |
addService(javax.management.DynamicMBean mbean,
javax.management.ObjectName beanName,
javax.management.MBeanServer targetServer,
String serviceId,
String serviceType,
int serviceVersion)
|
void |
addService(javax.management.MBeanInfo info,
javax.management.ObjectName beanName,
javax.management.MBeanServer targetServer,
String serviceId,
String serviceType,
int serviceVersion)
|
void |
addService(javax.management.modelmbean.ModelMBean mbean,
javax.management.ObjectName beanName,
javax.management.MBeanServer targetServer,
String serviceId,
String serviceType,
int serviceVersion)
|
void |
addService(Object mbean,
javax.management.ObjectName beanName,
javax.management.MBeanServer targetServer,
String serviceId,
String serviceType,
int serviceVersion)
|
InetSocketAddress |
getBindAddress()
|
protected String |
getDeviceInfo()
|
protected String |
getDeviceType()
|
protected String |
getLocation()
|
int |
getSSDPAliveDelay()
|
int |
getSSDPTTL()
|
protected List |
getUPNPMBeanChildrens()
|
protected UPNPMBeanService |
getUPNPMBeanService(String serviceUuid)
|
protected List |
getUPNPMBeanServices()
|
protected String |
getUuid()
|
protected boolean |
isRootDevice()
|
boolean |
isStarted()
|
void |
setBindAddress(InetSocketAddress bindAddress)
|
void |
setSSDPAliveDelay(int aliveDelay)
The SSDP alive broadcast message sending delay in seconds,
should be greater than 1800 secs |
void |
setSSDPTTL(int ssdpttl)
|
void |
start()
|
void |
stop()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IMPL_NAME
public static final String IMPL_NAME
DEFAULT_MAX_AGE
public static int DEFAULT_MAX_AGE
DEFAULT_TTL
public static int DEFAULT_TTL
UPNPMBeanDevice
public UPNPMBeanDevice(String deviceType,
int deviceVersion,
String manufacturer,
String friendlyName,
String modelName,
String internalId)
throws RuntimeException
- Throws:
RuntimeException
UPNPMBeanDevice
public UPNPMBeanDevice(String vendorDomain,
String deviceType,
int deviceVersion,
String manufacturer,
String friendlyName,
String modelName,
String internalId)
throws RuntimeException
- Throws:
RuntimeException
setBindAddress
public void setBindAddress(InetSocketAddress bindAddress)
getBindAddress
public InetSocketAddress getBindAddress()
getSSDPAliveDelay
public int getSSDPAliveDelay()
setSSDPAliveDelay
public void setSSDPAliveDelay(int aliveDelay)
- The SSDP alive broadcast message sending delay in seconds,
should be greater than 1800 secs
- Parameters:
aliveDelay -
getSSDPTTL
public int getSSDPTTL()
setSSDPTTL
public void setSSDPTTL(int ssdpttl)
getUPNPMBeanService
protected UPNPMBeanService getUPNPMBeanService(String serviceUuid)
getUPNPMBeanServices
protected List getUPNPMBeanServices()
getUPNPMBeanChildrens
protected List getUPNPMBeanChildrens()
getUuid
protected String getUuid()
getDeviceInfo
protected String getDeviceInfo()
isStarted
public boolean isStarted()
getLocation
protected String getLocation()
getDeviceType
protected String getDeviceType()
isRootDevice
protected boolean isRootDevice()
addChildMBean
public void addChildMBean(UPNPMBeanDevice device)
addService
public void addService(javax.management.modelmbean.ModelMBean mbean,
javax.management.ObjectName beanName,
javax.management.MBeanServer targetServer,
String serviceId,
String serviceType,
int serviceVersion)
throws IOException
- Throws:
IOException
addService
public void addService(javax.management.DynamicMBean mbean,
javax.management.ObjectName beanName,
javax.management.MBeanServer targetServer,
String serviceId,
String serviceType,
int serviceVersion)
throws IOException
- Throws:
IOException
addService
public void addService(Object mbean,
javax.management.ObjectName beanName,
javax.management.MBeanServer targetServer,
String serviceId,
String serviceType,
int serviceVersion)
throws IOException,
javax.management.IntrospectionException,
javax.management.InstanceNotFoundException,
javax.management.ReflectionException
- Throws:
IOException
javax.management.IntrospectionException
javax.management.InstanceNotFoundException
javax.management.ReflectionException
addService
public void addService(javax.management.MBeanInfo info,
javax.management.ObjectName beanName,
javax.management.MBeanServer targetServer,
String serviceId,
String serviceType,
int serviceVersion)
throws IOException
- Throws:
IOException
start
public void start()
throws Exception
- Throws:
Exception
stop
public void stop()
throws IOException
- Throws:
IOException
Copyright © 2010. All Rights Reserved.