net.sbbi.upnp.jmx.upnp
Class UPNPConnectorServer

java.lang.Object
  extended byjavax.management.NotificationBroadcasterSupport
      extended byjavax.management.remote.JMXConnectorServer
          extended bynet.sbbi.upnp.jmx.upnp.UPNPConnectorServer
All Implemented Interfaces:
java.util.EventListener, javax.management.remote.JMXConnectorServerMBean, javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, javax.management.NotificationListener

public class UPNPConnectorServer
extends javax.management.remote.JMXConnectorServer
implements javax.management.NotificationListener

JMX connector server, this connector can be used to expose all deployed MBeans on an MBeans Server as UPNP devices
You can use an object implementing the UPNPMBeanBuilder interface do define which beans can be deployed as UPNP devices.
Look at the UPNP_MBEANS_BUILDER, EXPOSE_UPNP_DEVICES_AS_MBEANS and EXPOSE_MBEANS_AS_UPNP_DEVICES vars for more info about connector specific settings.

Version:
1.0
Author:
SuperBonBon

Field Summary
static java.lang.String EXPOSE_EXISTING_MBEANS_AS_UPNP_DEVICES
          When set to true all MBeans registred into the MBeans server prior to the connector registration will be exposed as UPNP devices Default to Boolean.FALSE
static java.lang.String EXPOSE_MBEANS_AS_UPNP_DEVICES
          Environnment key to define if the MBeans registered into the connector MBeans server can be exposed as UPNP devices.
static java.lang.String EXPOSE_UPNP_DEVICES_AS_MBEANS
          Environement key do define if the connector can also expose as MBeans all UPNP devices services on the network.
static java.lang.String EXPOSE_UPNP_DEVICES_AS_MBEANS_TIMEOUT
          Integer key to define the discovery timeout (in ms) of UPNP devices on the network when the EXPOSE_UPNP_DEVICES_AS_MBEANS env key is set to Boolean.TRUE
static java.lang.String HANDLE_SSDP_MESSAGES
          Environement key when EXPOSE_UPNP_DEVICES_AS_MBEANS is set to true, will define SSDP messages will be handled by the connector, if set to true new devices joining the network will be automatically exposed as MBeans Key value must be Boolean.TRUE or Boolean.FALSE, default to Boolean.FALSE
static java.lang.String UPNP_MBEANS_BUILDER
          Environement key used to define the UPNPMBeanBuilder used to select MBeans to deploy as UPNP devices Key value must be an object UPNPMBeanBuilder instance.
 
Fields inherited from class javax.management.remote.JMXConnectorServer
AUTHENTICATOR
 
Constructor Summary
UPNPConnectorServer(javax.management.MBeanServer server, javax.management.remote.JMXServiceURL serviceURL, java.util.Map env)
           
 
Method Summary
 javax.management.remote.JMXServiceURL getAddress()
           
 java.util.Map getAttributes()
           
 void handleNotification(javax.management.Notification notification, java.lang.Object handBack)
           
 boolean isActive()
           
 void start()
           
 void stop()
           
 
Methods inherited from class javax.management.remote.JMXConnectorServer
getConnectionIds, getMBeanServer, getNotificationInfo, postDeregister, postRegister, preDeregister, preRegister, setMBeanServerForwarder, toJMXConnector
 
Methods inherited from class javax.management.NotificationBroadcasterSupport
addNotificationListener, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UPNP_MBEANS_BUILDER

public static final java.lang.String UPNP_MBEANS_BUILDER
Environement key used to define the UPNPMBeanBuilder used to select MBeans to deploy as UPNP devices Key value must be an object UPNPMBeanBuilder instance. When no implemntation is provided, the default UPNPMBeanBuilderImpl will be use.


EXPOSE_UPNP_DEVICES_AS_MBEANS

public static final java.lang.String EXPOSE_UPNP_DEVICES_AS_MBEANS
Environement key do define if the connector can also expose as MBeans all UPNP devices services on the network. Key value must be Boolean.TRUE or Boolean.FALSE, default to Boolean.FALSE


EXPOSE_UPNP_DEVICES_AS_MBEANS_TIMEOUT

public static final java.lang.String EXPOSE_UPNP_DEVICES_AS_MBEANS_TIMEOUT
Integer key to define the discovery timeout (in ms) of UPNP devices on the network when the EXPOSE_UPNP_DEVICES_AS_MBEANS env key is set to Boolean.TRUE


HANDLE_SSDP_MESSAGES

public static final java.lang.String HANDLE_SSDP_MESSAGES
Environement key when EXPOSE_UPNP_DEVICES_AS_MBEANS is set to true, will define SSDP messages will be handled by the connector, if set to true new devices joining the network will be automatically exposed as MBeans Key value must be Boolean.TRUE or Boolean.FALSE, default to Boolean.FALSE


EXPOSE_MBEANS_AS_UPNP_DEVICES

public static final java.lang.String EXPOSE_MBEANS_AS_UPNP_DEVICES
Environnment key to define if the MBeans registered into the connector MBeans server can be exposed as UPNP devices. Key value must be Boolean.TRUE or Boolean.FALSE, default to Boolean.TRUE


EXPOSE_EXISTING_MBEANS_AS_UPNP_DEVICES

public static final java.lang.String EXPOSE_EXISTING_MBEANS_AS_UPNP_DEVICES
When set to true all MBeans registred into the MBeans server prior to the connector registration will be exposed as UPNP devices Default to Boolean.FALSE

Constructor Detail

UPNPConnectorServer

public UPNPConnectorServer(javax.management.MBeanServer server,
                           javax.management.remote.JMXServiceURL serviceURL,
                           java.util.Map env)
                    throws java.io.IOException
Method Detail

getAddress

public javax.management.remote.JMXServiceURL getAddress()
Specified by:
getAddress in interface javax.management.remote.JMXConnectorServerMBean

getAttributes

public java.util.Map getAttributes()
Specified by:
getAttributes in interface javax.management.remote.JMXConnectorServerMBean

isActive

public boolean isActive()
Specified by:
isActive in interface javax.management.remote.JMXConnectorServerMBean

start

public void start()
           throws java.io.IOException
Specified by:
start in interface javax.management.remote.JMXConnectorServerMBean
Throws:
java.io.IOException

stop

public void stop()
          throws java.io.IOException
Specified by:
stop in interface javax.management.remote.JMXConnectorServerMBean
Throws:
java.io.IOException

handleNotification

public void handleNotification(javax.management.Notification notification,
                               java.lang.Object handBack)
Specified by:
handleNotification in interface javax.management.NotificationListener


Copyright © 2005 SuperBonBon Industries. All Rights Reserved.