Package 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
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_MAX_AGEstatic intDEFAULT_TTLstatic StringIMPL_NAME
-
Constructor Summary
Constructors Constructor Description 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddChildMBean(UPNPMBeanDevice device)voidaddService(Object mbean, ObjectName beanName, MBeanServer targetServer, String serviceId, String serviceType, int serviceVersion)voidaddService(DynamicMBean mbean, ObjectName beanName, MBeanServer targetServer, String serviceId, String serviceType, int serviceVersion)voidaddService(MBeanInfo info, ObjectName beanName, MBeanServer targetServer, String serviceId, String serviceType, int serviceVersion)voidaddService(ModelMBean mbean, ObjectName beanName, MBeanServer targetServer, String serviceId, String serviceType, int serviceVersion)InetSocketAddressgetBindAddress()protected StringgetDeviceInfo()protected StringgetDeviceType()protected StringgetLocation()intgetSSDPAliveDelay()intgetSSDPTTL()protected ListgetUPNPMBeanChildrens()protected UPNPMBeanServicegetUPNPMBeanService(String serviceUuid)protected ListgetUPNPMBeanServices()protected StringgetUuid()protected booleanisRootDevice()booleanisStarted()voidsetBindAddress(InetSocketAddress bindAddress)voidsetSSDPAliveDelay(int aliveDelay)The SSDP alive broadcast message sending delay in seconds, should be greater than 1800 secsvoidsetSSDPTTL(int ssdpttl)voidstart()voidstop()
-
-
-
Field Detail
-
IMPL_NAME
public static final String IMPL_NAME
-
DEFAULT_MAX_AGE
public static int DEFAULT_MAX_AGE
-
DEFAULT_TTL
public static int DEFAULT_TTL
-
-
Constructor Detail
-
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
-
-
Method Detail
-
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(ModelMBean mbean, ObjectName beanName, MBeanServer targetServer, String serviceId, String serviceType, int serviceVersion) throws IOException
- Throws:
IOException
-
addService
public void addService(DynamicMBean mbean, ObjectName beanName, MBeanServer targetServer, String serviceId, String serviceType, int serviceVersion) throws IOException
- Throws:
IOException
-
addService
public void addService(Object mbean, ObjectName beanName, MBeanServer targetServer, String serviceId, String serviceType, int serviceVersion) throws IOException, IntrospectionException, InstanceNotFoundException, ReflectionException
-
addService
public void addService(MBeanInfo info, ObjectName beanName, MBeanServer targetServer, String serviceId, String serviceType, int serviceVersion) throws IOException
- Throws:
IOException
-
stop
public void stop() throws IOException- Throws:
IOException
-
-