mil.dod.th.ose.remote/src/mil/dod/th/ose/remote/datastream/DataStreamMessageService.java
private Message enableStreamProfile(final DataStreamServiceNamespace message, final TerraHarvestMessage request, 
            final RemoteChannel channel) throws IOException
    {
        final EnableStreamProfileRequestData enableRequest = 
                EnableStreamProfileRequestData.parseFrom(message.getData());

        try
        {
            final StreamProfile streamProfile = m_DataStreamService.getStreamProfile(
                    SharedMessageUtils.convertProtoUUIDtoUUID(enableRequest.getUuid()));
            streamProfile.setEnabled(true);
            m_MessageFactory.createDataStreamServiceResponseMessage(request, 
                    DataStreamServiceMessageType.EnableStreamProfileResponse, null).queue(channel);
        }
        catch (final IllegalArgumentException e)
        {
            m_Logging.error(e, "Failed to enable stream profile.");
            m_MessageFactory.createBaseErrorMessage(request, ErrorCode.ILLEGAL_STATE,
                    GENERIC_ERR_MSG + e.getMessage()).queue(channel);
        }

        return enableRequest;
        
    }
/**
     * Method responsible for handling a remote request to enable a stream profile based on that
     * stream profile's UUID.
     * 
     * @param message
     *      EnableStreamProfileRequest message containing the UUID of the stream profile to be enabled
     * @param request
     *      entire remote message for the request
     * @param channel
     *      channel to use for sending a response
     * @return
     *      the data message for this request
     * @throws IOException
     *      if message cannot be parsed
     */
Method responsible for handling a remote request to enable a stream profile based on that
stream profile's UUID.


Method responsible for handling a remote request to enable a stream profile based on that stream profile ' s UUID .
private Message enableStreamProfile(final DataStreamServiceNamespace message, final TerraHarvestMessage request, 
            final RemoteChannel channel) throws IOException
    {
        final EnableStreamProfileRequestData enableRequest = 
                EnableStreamProfileRequestData.parseFrom(message.getData());
        try
        {
            final StreamProfile streamProfile = m_DataStreamService.getStreamProfile(
                    SharedMessageUtils.convertProtoUUIDtoUUID(enableRequest.getUuid()));
            streamProfile.setEnabled(true);
            m_MessageFactory.createDataStreamServiceResponseMessage(request, 
                    DataStreamServiceMessageType.EnableStreamProfileResponse, null).queue(channel);
        }
        catch (final IllegalArgumentException e)
        {
            m_Logging.error(e, "Failed to enable stream profile.");
            m_MessageFactory.createBaseErrorMessage(request, ErrorCode.ILLEGAL_STATE,
                    GENERIC_ERR_MSG + e.getMessage()).queue(channel);
        }
        return enableRequest;
    }
private Message enableStreamProfile ( final DataStreamServiceNamespace message , final TerraHarvestMessage request , final RemoteChannel channel ) throws IOException { final EnableStreamProfileRequestData enableRequest = EnableStreamProfileRequestData . parseFrom ( message . getData ( ) ) ; try { final StreamProfile streamProfile = m_DataStreamService . getStreamProfile ( SharedMessageUtils . convertProtoUUIDtoUUID ( enableRequest . getUuid ( ) ) ) ; streamProfile . setEnabled ( true ) ; m_MessageFactory . createDataStreamServiceResponseMessage ( request , DataStreamServiceMessageType . EnableStreamProfileResponse , null ) . queue ( channel ) ; } catch ( final IllegalArgumentException e ) { m_Logging . error ( e , "Failed to enable stream profile." ) ; m_MessageFactory . createBaseErrorMessage ( request , ErrorCode . ILLEGAL_STATE , GENERIC_ERR_MSG + e . getMessage ( ) ) . queue ( channel ) ; } return enableRequest ; }
Method responsible for handling a remote request to enable a stream profile based on that
 stream profile's UUID.
Method responsible for handling a remote request to enable a stream profile based on that stream profile ' s UUID .