mil.dod.th.ose.remote/src/mil/dod/th/ose/remote/osgi/EventAdminMessageService.java
private Message unregister(final TerraHarvestMessage request, final EventAdminNamespace message, 
            final RemoteChannel channel) throws IOException 
    {
        final UnregisterEventRequestData requestData = UnregisterEventRequestData.parseFrom(message.getData());
        //TD: id might not be valid, should check input before using it
        final RemoteEventRegistration eventReg = m_Registrations.remove(requestData.getId());  
        final ServiceRegistration<EventHandler> serviceReg = eventReg.getServiceRegistration();
        serviceReg.unregister();
        
        //remove for datastore
        removePersistedRegistration(requestData.getId());
        
        //construct response message      
        m_MessageFactory.createEventAdminResponseMessage(request, EventAdminMessageType.UnregisterEventResponse, 
                null).queue(channel);
        
        return requestData;
    }
/**
     * Method that is responsible for unregistering remote event notifications via a registration ID
     * contained in the event message.
     * 
     * @param request
     *      entire remote message for the request
     * @param message
     *      message containing the registration ID of the event to be unregistered 
     * @param channel
     *      channel to use for sending a response
     * @throws IOException 
     *      if message cannot be parsed or if response message cannot be sent
     * @return
     *      the data message for this request 
     */
Method that is responsible for unregistering remote event notifications via a registration ID
contained in the event message.


Method that is responsible for unregistering remote event notifications via a registration ID contained in the event message .
private Message unregister(final TerraHarvestMessage request, final EventAdminNamespace message, 
            final RemoteChannel channel) throws IOException 
    {
        final UnregisterEventRequestData requestData = UnregisterEventRequestData.parseFrom(message.getData());
        final RemoteEventRegistration eventReg = m_Registrations.remove(requestData.getId());  
        final ServiceRegistration<EventHandler> serviceReg = eventReg.getServiceRegistration();
        serviceReg.unregister();
        removePersistedRegistration(requestData.getId());
        m_MessageFactory.createEventAdminResponseMessage(request, EventAdminMessageType.UnregisterEventResponse, 
                null).queue(channel);
        return requestData;
    }
private Message unregister ( final TerraHarvestMessage request , final EventAdminNamespace message , final RemoteChannel channel ) throws IOException { final UnregisterEventRequestData requestData = UnregisterEventRequestData . parseFrom ( message . getData ( ) ) ; final RemoteEventRegistration eventReg = m_Registrations . remove ( requestData . getId ( ) ) ; final ServiceRegistration < EventHandler > serviceReg = eventReg . getServiceRegistration ( ) ; serviceReg . unregister ( ) ; removePersistedRegistration ( requestData . getId ( ) ) ; m_MessageFactory . createEventAdminResponseMessage ( request , EventAdminMessageType . UnregisterEventResponse , null ) . queue ( channel ) ; return requestData ; }
Method that is responsible for unregistering remote event notifications via a registration ID
 contained in the event message.
Method that is responsible for unregistering remote event notifications via a registration ID contained in the event message .
//TD: id might not be valid, should check input before using it //remove for datastore //construct response message      