mil.dod.th.ose.remote/src/mil/dod/th/ose/remote/asset/AssetMessageService.java
private Message deactiveAsset(final AssetNamespace message, final TerraHarvestMessage request, 
            final RemoteChannel channel) throws IOException
    {
        final DeactivateRequestData deactivateRequest = DeactivateRequestData.parseFrom(message.getData());
        try
        {
            final Asset asset = m_AssetDirectoryService.getAssetByUuid(
                SharedMessageUtils.convertProtoUUIDtoUUID(deactivateRequest.getUuid()));
            asset.deactivateAsync();
            m_MessageFactory.createAssetResponseMessage(request, 
                AssetMessageType.DeactivateResponse, null).queue(channel);
        }
        catch (final IllegalStateException e)
        {
            m_Logging.error(e, "Failed to deactivate asset.");
            m_MessageFactory.createBaseErrorMessage(request, ErrorCode.ILLEGAL_STATE, 
                    GENERIC_ERR_MSG + e.getMessage()).queue(channel);
        }

        return deactivateRequest;
    }
/**
     * Method responsible for handling a remote request to deactivate a specific asset based on that asset's UUID.
     * @param message
     *      deactivate asset request message containing the UUID of the asset to be activated
     * @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 deactivate a specific asset based on that asset's UUID.
Method responsible for handling a remote request to deactivate a specific asset based on that asset ' s UUID .
private Message deactiveAsset(final AssetNamespace message, final TerraHarvestMessage request, 
            final RemoteChannel channel) throws IOException
    {
        final DeactivateRequestData deactivateRequest = DeactivateRequestData.parseFrom(message.getData());
        try
        {
            final Asset asset = m_AssetDirectoryService.getAssetByUuid(
                SharedMessageUtils.convertProtoUUIDtoUUID(deactivateRequest.getUuid()));
            asset.deactivateAsync();
            m_MessageFactory.createAssetResponseMessage(request, 
                AssetMessageType.DeactivateResponse, null).queue(channel);
        }
        catch (final IllegalStateException e)
        {
            m_Logging.error(e, "Failed to deactivate asset.");
            m_MessageFactory.createBaseErrorMessage(request, ErrorCode.ILLEGAL_STATE, 
                    GENERIC_ERR_MSG + e.getMessage()).queue(channel);
        }
        return deactivateRequest;
    }
private Message deactiveAsset ( final AssetNamespace message , final TerraHarvestMessage request , final RemoteChannel channel ) throws IOException { final DeactivateRequestData deactivateRequest = DeactivateRequestData . parseFrom ( message . getData ( ) ) ; try { final Asset asset = m_AssetDirectoryService . getAssetByUuid ( SharedMessageUtils . convertProtoUUIDtoUUID ( deactivateRequest . getUuid ( ) ) ) ; asset . deactivateAsync ( ) ; m_MessageFactory . createAssetResponseMessage ( request , AssetMessageType . DeactivateResponse , null ) . queue ( channel ) ; } catch ( final IllegalStateException e ) { m_Logging . error ( e , "Failed to deactivate asset." ) ; m_MessageFactory . createBaseErrorMessage ( request , ErrorCode . ILLEGAL_STATE , GENERIC_ERR_MSG + e . getMessage ( ) ) . queue ( channel ) ; } return deactivateRequest ; }
Method responsible for handling a remote request to deactivate a specific asset based on that asset's UUID.
Method responsible for handling a remote request to deactivate a specific asset based on that asset ' s UUID .