m.setAccessible(true);// workaround for known bug http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6924232
gid=(GoalID)m.invoke(goalMessage);
}
catch(Exceptione){
e.printStackTrace(System.out);
}
}
returngid;
}
publicvoidsetGoalIdMessage(GoalIDgid){
}
publicT_ACTION_GOALgetActionGoalMessage(){
returngoalMessage;
}
publicvoidsetActionGoalMessage(T_ACTION_GOALagm){
publicstaticclassGoalStates
{
publicfinalstaticintPENDING=0;// The goal has yet to be processed by the action server
publicfinalstaticintACTIVE=1;// The goal is currently being processed by the action server
publicfinalstaticintREJECTED=2;// The goal was rejected by the action server without being processed and without a request from the action client to cancel
publicfinalstaticintSUCCEEDED=3;// The goal was achieved successfully by the action server
publicfinalstaticintABORTED=4;// The goal was aborted by the action server
publicfinalstaticintPREEMPTING=5;// Processing of the goal was canceled by either another goal, or a cancel request sent to the action server
publicfinalstaticintPREEMPTED=6;// The goal was preempted by either another goal, or a preempt message being sent to the action server
publicfinalstaticintRECALLING=7;// The goal has not been processed and a cancel request has been received from the action client, but the action server has not confirmed the goal is canceled
publicfinalstaticintRECALLED=8;// The goal was canceled by either another goal, or a cancel request before the action server began processing the goal