mil.dod.th.ose.gui.webapp/src/mil/dod/th/ose/gui/webapp/advanced/BundleMgrImpl.java
public void registerBundleEvents()
        {
            final BundleContext context = m_BundleUtil.getBundleContext();
            // register to listen for message received events.
            final Dictionary<String, Object> props = new Hashtable<String, Object>();
            props.put(EventConstants.EVENT_TOPIC, RemoteConstants.TOPIC_MESSAGE_RECEIVED);
            final String filterString = String.format("(&(%s=%s)(|(%s=%s)(%s=%s)))", 
                RemoteConstants.EVENT_PROP_NAMESPACE, Namespace.Bundle.toString(),
                RemoteConstants.EVENT_PROP_MESSAGE_TYPE, BundleMessageType.GetBundleInfoResponse.toString(),
                RemoteConstants.EVENT_PROP_MESSAGE_TYPE, BundleMessageType.BundleNamespaceError.toString());
            props.put(EventConstants.EVENT_FILTER, filterString);
            
            //register the event handler that listens for messages received.
            m_Registration = context.registerService(EventHandler.class, this, props);    
        }
/**
         * Method to register this event handler for the message received topic and filter by the bundle namespace.
         */
Method to register this event handler for the message received topic and filter by the bundle namespace.
Method to register this event handler for the message received topic and filter by the bundle namespace .
public void registerBundleEvents()
        {
            final BundleContext context = m_BundleUtil.getBundleContext();
            final Dictionary<String, Object> props = new Hashtable<String, Object>();
            props.put(EventConstants.EVENT_TOPIC, RemoteConstants.TOPIC_MESSAGE_RECEIVED);
            final String filterString = String.format("(&(%s=%s)(|(%s=%s)(%s=%s)))", 
                RemoteConstants.EVENT_PROP_NAMESPACE, Namespace.Bundle.toString(),
                RemoteConstants.EVENT_PROP_MESSAGE_TYPE, BundleMessageType.GetBundleInfoResponse.toString(),
                RemoteConstants.EVENT_PROP_MESSAGE_TYPE, BundleMessageType.BundleNamespaceError.toString());
            props.put(EventConstants.EVENT_FILTER, filterString);
            m_Registration = context.registerService(EventHandler.class, this, props);    
        }
public void registerBundleEvents ( ) { final BundleContext context = m_BundleUtil . getBundleContext ( ) ; final Dictionary < String , Object > props = new Hashtable < String , Object > ( ) ; props . put ( EventConstants . EVENT_TOPIC , RemoteConstants . TOPIC_MESSAGE_RECEIVED ) ; final String filterString = String . format ( "(&(%s=%s)(|(%s=%s)(%s=%s)))" , RemoteConstants . EVENT_PROP_NAMESPACE , Namespace . Bundle . toString ( ) , RemoteConstants . EVENT_PROP_MESSAGE_TYPE , BundleMessageType . GetBundleInfoResponse . toString ( ) , RemoteConstants . EVENT_PROP_MESSAGE_TYPE , BundleMessageType . BundleNamespaceError . toString ( ) ) ; props . put ( EventConstants . EVENT_FILTER , filterString ) ; m_Registration = context . registerService ( EventHandler . class , this , props ) ; }
Method to register this event handler for the message received topic and filter by the bundle namespace.
Method to register this event handler for the message received topic and filter by the bundle namespace .
// register to listen for message received events. //register the event handler that listens for messages received.