mil.dod.th.ose.remote.integration/src/mil/dod/th/ose/remote/integration/DataStreamServiceNamespaceUtils.java
public static void enableStreamProfile(Socket socket, SharedMessages.UUID uuid) throws IOException
    {
        MessageListener listener = new MessageListener(socket);
        
        int regId = RemoteEventRegistration.regRemoteEventMessages(socket,
                DataStreamService.TOPIC_STREAM_PROFILE_STATE_CHANGED, String.format("(%s=%s)",
                        FactoryDescriptor.EVENT_PROP_OBJ_UUID, 
                        SharedMessageUtils.convertProtoUUIDtoUUID(uuid)));
        
        EnableStreamProfileRequestData request = EnableStreamProfileRequestData.newBuilder().
                setUuid(uuid).build();
        TerraHarvestMessage message = DataStreamServiceNamespaceUtils.createDataStreamServiceNamespaceMessage(
                DataStreamServiceMessageType.EnableStreamProfileRequest, request);
        message.writeDelimitedTo(socket.getOutputStream());
        
        try
        {
            listener.waitForMessages(TIMEOUT,
                    new BasicMessageMatcher(Namespace.DataStreamService, 
                            DataStreamServiceMessageType.EnableStreamProfileResponse),
                    new MessageMatchers.EventMessageMatcher(DataStreamService.TOPIC_STREAM_PROFILE_STATE_CHANGED));
        }
        finally
        {
            MessageListener.unregisterEvent(regId, socket);
        }
    }
/**
     * Enable a stream profile using the given UUID and wait for the response.
     */
Enable a stream profile using the given UUID and wait for the response.
Enable a stream profile using the given UUID and wait for the response .
public static void enableStreamProfile(Socket socket, SharedMessages.UUID uuid) throws IOException
    {
        MessageListener listener = new MessageListener(socket);
        int regId = RemoteEventRegistration.regRemoteEventMessages(socket,
                DataStreamService.TOPIC_STREAM_PROFILE_STATE_CHANGED, String.format("(%s=%s)",
                        FactoryDescriptor.EVENT_PROP_OBJ_UUID, 
                        SharedMessageUtils.convertProtoUUIDtoUUID(uuid)));
        EnableStreamProfileRequestData request = EnableStreamProfileRequestData.newBuilder().
                setUuid(uuid).build();
        TerraHarvestMessage message = DataStreamServiceNamespaceUtils.createDataStreamServiceNamespaceMessage(
                DataStreamServiceMessageType.EnableStreamProfileRequest, request);
        message.writeDelimitedTo(socket.getOutputStream());
        try
        {
            listener.waitForMessages(TIMEOUT,
                    new BasicMessageMatcher(Namespace.DataStreamService, 
                            DataStreamServiceMessageType.EnableStreamProfileResponse),
                    new MessageMatchers.EventMessageMatcher(DataStreamService.TOPIC_STREAM_PROFILE_STATE_CHANGED));
        }
        finally
        {
            MessageListener.unregisterEvent(regId, socket);
        }
    }
public static void enableStreamProfile ( Socket socket , SharedMessages . UUID uuid ) throws IOException { MessageListener listener = new MessageListener ( socket ) ; int regId = RemoteEventRegistration . regRemoteEventMessages ( socket , DataStreamService . TOPIC_STREAM_PROFILE_STATE_CHANGED , String . format ( "(%s=%s)" , FactoryDescriptor . EVENT_PROP_OBJ_UUID , SharedMessageUtils . convertProtoUUIDtoUUID ( uuid ) ) ) ; EnableStreamProfileRequestData request = EnableStreamProfileRequestData . newBuilder ( ) . setUuid ( uuid ) . build ( ) ; TerraHarvestMessage message = DataStreamServiceNamespaceUtils . createDataStreamServiceNamespaceMessage ( DataStreamServiceMessageType . EnableStreamProfileRequest , request ) ; message . writeDelimitedTo ( socket . getOutputStream ( ) ) ; try { listener . waitForMessages ( TIMEOUT , new BasicMessageMatcher ( Namespace . DataStreamService , DataStreamServiceMessageType . EnableStreamProfileResponse ) , new MessageMatchers . EventMessageMatcher ( DataStreamService . TOPIC_STREAM_PROFILE_STATE_CHANGED ) ) ; } finally { MessageListener . unregisterEvent ( regId , socket ) ; } }
Enable a stream profile using the given UUID and wait for the response.
Enable a stream profile using the given UUID and wait for the response .