mil.dod.th.ose.remote/src/mil/dod/th/ose/remote/transport/TransportMessageListener.java
private void registerEventHandler(final BundleContext context)
    {
        final Dictionary<String, Object> properties = new Hashtable<String, Object>();
        properties.put(EventConstants.EVENT_TOPIC, TransportLayer.TOPIC_PACKET_RECEIVED);
        properties.put(EventConstants.EVENT_FILTER, 
                String.format("(&(%s=%s)(%s=%s)(%s=%s))",
                        // only get packet from one transport
                        FactoryDescriptor.EVENT_PROP_OBJ_NAME, 
                        m_Channel.getTransportLayerName(), 
                        // AND only get packet for one source address (remote address)
                        Address.EVENT_PROP_SOURCE_ADDRESS_PREFIX + Address.EVENT_PROP_MESSAGE_ADDRESS_SUFFIX, 
                        m_Channel.getRemoteMessageAddress(),
                        // AND only get packet for one destination address (local address)
                        Address.EVENT_PROP_DEST_ADDRESS_PREFIX + Address.EVENT_PROP_MESSAGE_ADDRESS_SUFFIX, 
                        m_Channel.getLocalMessageAddress())); 
        this.m_ServiceRegistration = context.registerService(EventHandler.class, this, properties);
    }
/**
     * Helper method for registering an event handler that is fired when a new message comes in through the remote 
     * channel.  
     * 
     * @param context
     *      context of bundles used to register {@link EventHandler}
     *      
     */
Helper method for registering an event handler that is fired when a new message comes in through the remote
channel.

@param context
context of bundles used to register  EventHandler
Helper method for registering an event handler that is fired when a new message comes in through the remote channel . @param context context of bundles used to register EventHandler
private void registerEventHandler(final BundleContext context)
    {
        final Dictionary<String, Object> properties = new Hashtable<String, Object>();
        properties.put(EventConstants.EVENT_TOPIC, TransportLayer.TOPIC_PACKET_RECEIVED);
        properties.put(EventConstants.EVENT_FILTER, 
                String.format("(&(%s=%s)(%s=%s)(%s=%s))",
                        FactoryDescriptor.EVENT_PROP_OBJ_NAME, 
                        m_Channel.getTransportLayerName(), 
                        Address.EVENT_PROP_SOURCE_ADDRESS_PREFIX + Address.EVENT_PROP_MESSAGE_ADDRESS_SUFFIX, 
                        m_Channel.getRemoteMessageAddress(),
                        Address.EVENT_PROP_DEST_ADDRESS_PREFIX + Address.EVENT_PROP_MESSAGE_ADDRESS_SUFFIX, 
                        m_Channel.getLocalMessageAddress())); 
        this.m_ServiceRegistration = context.registerService(EventHandler.class, this, properties);
    }
private void registerEventHandler ( final BundleContext context ) { final Dictionary < String , Object > properties = new Hashtable < String , Object > ( ) ; properties . put ( EventConstants . EVENT_TOPIC , TransportLayer . TOPIC_PACKET_RECEIVED ) ; properties . put ( EventConstants . EVENT_FILTER , String . format ( "(&(%s=%s)(%s=%s)(%s=%s))" , FactoryDescriptor . EVENT_PROP_OBJ_NAME , m_Channel . getTransportLayerName ( ) , Address . EVENT_PROP_SOURCE_ADDRESS_PREFIX + Address . EVENT_PROP_MESSAGE_ADDRESS_SUFFIX , m_Channel . getRemoteMessageAddress ( ) , Address . EVENT_PROP_DEST_ADDRESS_PREFIX + Address . EVENT_PROP_MESSAGE_ADDRESS_SUFFIX , m_Channel . getLocalMessageAddress ( ) ) ) ; this . m_ServiceRegistration = context . registerService ( EventHandler . class , this , properties ) ; }
Helper method for registering an event handler that is fired when a new message comes in through the remote
 channel.
Helper method for registering an event handler that is fired when a new message comes in through the remote channel .
// only get packet from one transport // AND only get packet for one source address (remote address) // AND only get packet for one destination address (local address)