com.ibm.streamsx.rest

Interface Result<T,R>

  • Type Parameters:
    T - Type of the element being created.
    R - Type of the raw response.


    public interface Result<T,R>
    Represents a result from a REST request. Any method that returns a Result defines what values are returned by its methods.
    Since:
    1.8
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      T getElement()
      Get the element associated with the request.
      java.lang.String getId()
      Get the object identifier associated with the request.
      R getRawResult()
      Get the raw result from the request.
      boolean isOk()
      Was the request successful.
    • Method Detail

      • getId

        java.lang.String getId()
        Get the object identifier associated with the request.
        Returns:
        object identifier associated with the request.
      • getElement

        T getElement()
              throws java.io.IOException
        Get the element associated with the request.
        Returns:
        element associated with the request.
        Throws:
        java.io.IOException - Error communicating with REST server.
      • getRawResult

        R getRawResult()
        Get the raw result from the request.
        Unless specified by the method returning a Result the contents of a raw result are not guaranteed to be stable across releases.
        Returns:
        raw result from the request.
      • isOk

        boolean isOk()
        Was the request successful.
        Returns:
        true if the request was successful, false otherwise.
streamsx.topology 2.1 @ IBMStreams GitHub