mil.dod.th.ose.remote.integration/src/mil/dod/th/ose/remote/integration/MessageListener.java
public static void unregisterEvent(int regId, Socket socket) throws IOException
    {
        MessageListener listener = new MessageListener(socket); 
        
        //clean up registered events
        UnregisterEventRequestData unreg = UnregisterEventRequestData.newBuilder().setId(regId).build();
        TerraHarvestMessage message = TestEventAdminNamespace.createEventAdminMessage(
                EventAdminMessageType.UnregisterEventRequest, unreg);
        // send out message
        message.writeDelimitedTo(socket.getOutputStream());
        
        //listen for potential messages as a result of new request
        //assert unregister event response was received
        listener.waitForMessage(Namespace.EventAdmin, EventAdminMessageType.UnregisterEventResponse, 1500);
    }
/**
     * Method used to unregister for registered events. 
     * @param regId
     *      registration ID of registered event.
     * @param socket
     *      socket used to send unregister event request
     * @throws IOException 
     *      if cannot get output stream due to socket issues
     */
Method used to unregister for registered events.
@param regId
registration ID of registered event.
@param socket
socket used to send unregister event request
@throws IOException
if cannot get output stream due to socket issues
Method used to unregister for registered events . @param regId registration ID of registered event . @param socket socket used to send unregister event request @throws IOException if cannot get output stream due to socket issues
public static void unregisterEvent(int regId, Socket socket) throws IOException
    {
        MessageListener listener = new MessageListener(socket); 
        UnregisterEventRequestData unreg = UnregisterEventRequestData.newBuilder().setId(regId).build();
        TerraHarvestMessage message = TestEventAdminNamespace.createEventAdminMessage(
                EventAdminMessageType.UnregisterEventRequest, unreg);
        message.writeDelimitedTo(socket.getOutputStream());
        listener.waitForMessage(Namespace.EventAdmin, EventAdminMessageType.UnregisterEventResponse, 1500);
    }
public static void unregisterEvent ( int regId , Socket socket ) throws IOException { MessageListener listener = new MessageListener ( socket ) ; UnregisterEventRequestData unreg = UnregisterEventRequestData . newBuilder ( ) . setId ( regId ) . build ( ) ; TerraHarvestMessage message = TestEventAdminNamespace . createEventAdminMessage ( EventAdminMessageType . UnregisterEventRequest , unreg ) ; message . writeDelimitedTo ( socket . getOutputStream ( ) ) ; listener . waitForMessage ( Namespace . EventAdmin , EventAdminMessageType . UnregisterEventResponse , 1500 ) ; }
Method used to unregister for registered events.
Method used to unregister for registered events .
//clean up registered events // send out message //listen for potential messages as a result of new request //assert unregister event response was received