mil.dod.th.ose.remote/src/mil/dod/th/ose/remote/datastream/store/DataStreamStoreMessageService.java
private Message enableArchiving(final DataStreamStoreNamespace message, final TerraHarvestMessage request,
            final RemoteChannel channel) throws IOException
    {
        final EnableArchivingRequestData enableRequest =
                EnableArchivingRequestData.parseFrom(message.getData());
        
        try
        {
            final StreamProfile streamProfile = m_DataStreamService.getStreamProfile(
                    SharedMessageUtils.convertProtoUUIDtoUUID(enableRequest.getStreamProfileUuid()));
            
            final boolean useSourceBitrate = enableRequest.getUseSourceBitrate();
            final long heartbeatPeriod = enableRequest.getHeartbeatPeriod();
            final long delay = enableRequest.getDelay();
            
            m_DataStreamStore.enableArchiving(streamProfile, useSourceBitrate, heartbeatPeriod, delay);
            
            m_MessageFactory.createDataStreamStoreResponseMessage(request, 
                    DataStreamStoreMessageType.EnableArchivingResponse, null).queue(channel); 
        }
        catch (final IllegalArgumentException e)
        {
            m_Logging.error(e, "Failed to enable archiving process.");
            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 an archiving process based on a
     * stream profile's UUID.
     * 
     * @param message
     *      EnableArchivingRequest message containing a stream profile UUID, a heartbeat period, a
     *      delay value, and a boolean indicating whether to use the source bitrate
     * @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 an archiving process based on a
stream profile's UUID.


Method responsible for handling a remote request to enable an archiving process based on a stream profile ' s UUID .
private Message enableArchiving(final DataStreamStoreNamespace message, final TerraHarvestMessage request,
            final RemoteChannel channel) throws IOException
    {
        final EnableArchivingRequestData enableRequest =
                EnableArchivingRequestData.parseFrom(message.getData());
        try
        {
            final StreamProfile streamProfile = m_DataStreamService.getStreamProfile(
                    SharedMessageUtils.convertProtoUUIDtoUUID(enableRequest.getStreamProfileUuid()));
            final boolean useSourceBitrate = enableRequest.getUseSourceBitrate();
            final long heartbeatPeriod = enableRequest.getHeartbeatPeriod();
            final long delay = enableRequest.getDelay();
            m_DataStreamStore.enableArchiving(streamProfile, useSourceBitrate, heartbeatPeriod, delay);
            m_MessageFactory.createDataStreamStoreResponseMessage(request, 
                    DataStreamStoreMessageType.EnableArchivingResponse, null).queue(channel); 
        }
        catch (final IllegalArgumentException e)
        {
            m_Logging.error(e, "Failed to enable archiving process.");
            m_MessageFactory.createBaseErrorMessage(request, ErrorCode.ILLEGAL_STATE,
                    GENERIC_ERR_MSG + e.getMessage()).queue(channel);
        }
        return enableRequest;
    }
private Message enableArchiving ( final DataStreamStoreNamespace message , final TerraHarvestMessage request , final RemoteChannel channel ) throws IOException { final EnableArchivingRequestData enableRequest = EnableArchivingRequestData . parseFrom ( message . getData ( ) ) ; try { final StreamProfile streamProfile = m_DataStreamService . getStreamProfile ( SharedMessageUtils . convertProtoUUIDtoUUID ( enableRequest . getStreamProfileUuid ( ) ) ) ; final boolean useSourceBitrate = enableRequest . getUseSourceBitrate ( ) ; final long heartbeatPeriod = enableRequest . getHeartbeatPeriod ( ) ; final long delay = enableRequest . getDelay ( ) ; m_DataStreamStore . enableArchiving ( streamProfile , useSourceBitrate , heartbeatPeriod , delay ) ; m_MessageFactory . createDataStreamStoreResponseMessage ( request , DataStreamStoreMessageType . EnableArchivingResponse , null ) . queue ( channel ) ; } catch ( final IllegalArgumentException e ) { m_Logging . error ( e , "Failed to enable archiving process." ) ; 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 an archiving process based on a
 stream profile's UUID.
Method responsible for handling a remote request to enable an archiving process based on a stream profile ' s UUID .