Class ROSSendGoalOperation

java.lang.Object
org.hypermedea.op.BaseOperation
org.hypermedea.ros.ROSOperation
org.hypermedea.ros.ROSSendGoalOperation
All Implemented Interfaces:
org.hypermedea.op.Operation

public class ROSSendGoalOperation extends ROSOperation
  • Field Summary

    Fields inherited from class org.hypermedea.ros.ROSOperation

    DEFAULT_MESSAGE_TYPE, topic

    Fields inherited from class org.hypermedea.op.BaseOperation

    DEFAULT_TIMEOUT, form, operationStarted, payload, target

    Fields inherited from interface org.hypermedea.op.Operation

    DELETE, GET, METHOD_NAME_FIELD, PATCH, POST, PUT, WATCH
  • Constructor Summary

    Constructors
    Constructor
    Description
    ROSSendGoalOperation(String targetURI, Map<String,Object> formFields)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected String
    Map the path element of the operation's target URI to a ROS topic.
    protected void
    Publish payload wrapped in a message with auto-generated GoalID to the goal topic of the action server declared in form.

    Methods inherited from class org.hypermedea.ros.ROSOperation

    buildJson, getDefaultMessageType, parseJson, parseJsonNumber

    Methods inherited from class org.hypermedea.op.BaseOperation

    end, getForm, getMethod, getPayload, getResponse, getTargetURI, isAsync, isIdempotent, isSafe, onError, onResponse, registerResponseCallback, sendRequest, setPayload, setPayload, setTimeout, toString, unregisterResponseCallback

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

  • Method Details

    • sendSingleRequest

      protected void sendSingleRequest() throws IOException

      Publish payload wrapped in a message with auto-generated GoalID to the goal topic of the action server declared in form. The response returned to the caller includes a link to the on-going action, for querying and cancellation (action ID given as URI fragment).

      The current implementation returns a response as soon as the action server acknowledges the request and provides a status code for it (see ROSGetStatusOperation).

      Overrides:
      sendSingleRequest in class ROSOperation
      Throws:
      IOException
    • getTopicName

      protected String getTopicName(String path)
      Description copied from class: ROSOperation
      Map the path element of the operation's target URI to a ROS topic.
      Specified by:
      getTopicName in class ROSOperation
      Parameters:
      path - path of the target URI declared in the input form
      Returns:
      a full topic name for the operation