mil.dod.th.ose.remote/src/mil/dod/th/ose/remote/mp/MissionProgrammingMessageService.java
private Message cancelProgram(final TerraHarvestMessage message, final MissionProgrammingNamespace missionMessage,
            final RemoteChannel channel) throws IOException
    {
        //parse the request
        final CancelProgramRequestData request = CancelProgramRequestData.parseFrom(missionMessage.getData());
        final String programName = request.getMissionName();
        final Program program = m_Manager.getProgram(programName);
        
        //cancel the program
        program.cancel();
        
        //response message
        final CancelProgramResponseData response = CancelProgramResponseData.newBuilder().
                setMissionName(programName).
                setMissionStatus(EnumConverter.convertProgramStatusToMissionStatus(
                        program.getProgramStatus())).build();
        m_MessageFactory.createMissionProgrammingResponseMessage(message, 
                MissionProgrammingMessageType.CancelProgramResponse, response).queue(channel);
        return request;
    }
/**
     * Handle the request to cancel a program that is scheduled in the future.
     * @param message
     *     the complete request
     * @param missionMessage
     *     the mission program specific message that contains the name of the program to cancel
     * @param channel
     *     the channel from which the request was received
     * @return
     *     the parsed data message
     * @throws IOException
     *     thrown in the event that an error is experienced while attempting to send the response message 
     */
Handle the request to cancel a program that is scheduled in the future.
Handle the request to cancel a program that is scheduled in the future .
private Message cancelProgram(final TerraHarvestMessage message, final MissionProgrammingNamespace missionMessage,
            final RemoteChannel channel) throws IOException
    {
        final CancelProgramRequestData request = CancelProgramRequestData.parseFrom(missionMessage.getData());
        final String programName = request.getMissionName();
        final Program program = m_Manager.getProgram(programName);
        program.cancel();
        final CancelProgramResponseData response = CancelProgramResponseData.newBuilder().
                setMissionName(programName).
                setMissionStatus(EnumConverter.convertProgramStatusToMissionStatus(
                        program.getProgramStatus())).build();
        m_MessageFactory.createMissionProgrammingResponseMessage(message, 
                MissionProgrammingMessageType.CancelProgramResponse, response).queue(channel);
        return request;
    }
private Message cancelProgram ( final TerraHarvestMessage message , final MissionProgrammingNamespace missionMessage , final RemoteChannel channel ) throws IOException { final CancelProgramRequestData request = CancelProgramRequestData . parseFrom ( missionMessage . getData ( ) ) ; final String programName = request . getMissionName ( ) ; final Program program = m_Manager . getProgram ( programName ) ; program . cancel ( ) ; final CancelProgramResponseData response = CancelProgramResponseData . newBuilder ( ) . setMissionName ( programName ) . setMissionStatus ( EnumConverter . convertProgramStatusToMissionStatus ( program . getProgramStatus ( ) ) ) . build ( ) ; m_MessageFactory . createMissionProgrammingResponseMessage ( message , MissionProgrammingMessageType . CancelProgramResponse , response ) . queue ( channel ) ; return request ; }
Handle the request to cancel a program that is scheduled in the future.
Handle the request to cancel a program that is scheduled in the future .
//parse the request //cancel the program //response message