com.ibm.streamsx.topology.context

Interface StreamsContext<T>

  • Type Parameters:
    T - Type of value returned from submit


    public interface StreamsContext<T>
    A StreamsContext provides the ability to turn a Topology into an executable. The type of the context determines the form of the executable, see StreamsContext.Type.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      StreamsContext.Type getType()
      The type of this context.
      boolean isSupported(Topology topology)
      Answers if this StreamsContext supports execution of the topology.
      java.util.concurrent.Future<T> submit(com.google.gson.JsonObject submission)
      Submit a topology} to this Streams context as a JSON object.
      java.util.concurrent.Future<T> submit(Topology topology, java.util.Map<java.lang.String,java.lang.Object> config)
      Submit topology to this Streams context with a specific configuration.
      java.util.concurrent.Future<T> submit(Topology topology)
      Submit topology to this Streams context.
    • Method Detail

      • getType

        StreamsContext.Type getType()
        The type of this context.
        Returns:
        type of this context.
      • isSupported

        boolean isSupported(Topology topology)
        Answers if this StreamsContext supports execution of the topology.
        Parameters:
        topology - Topology to evaluate.
        Returns:
        true if this context supports execution of the topology.
        See Also:
        StreamsContext.Type.EMBEDDED
      • submit

        java.util.concurrent.Future<T> submit(Topology topology)
                                       throws java.lang.Exception
        Submit topology to this Streams context.
        Parameters:
        topology - Topology to be submitted.
        Returns:
        Future for the submission, see the descriptions for the StreamsContext.Type returned by getType() for details on what the encapsulated returned value represents.
        Throws:
        java.lang.Exception - Exception submitting the topology.
      • submit

        java.util.concurrent.Future<T> submit(Topology topology,
                                              java.util.Map<java.lang.String,java.lang.Object> config)
                                       throws java.lang.Exception
        Submit topology to this Streams context with a specific configuration.
        Parameters:
        topology - Topology to be submitted.
        config - Configuration to be used for the submission, may be modified by this method.
        Returns:
        Future for the submission, see the descriptions for the StreamsContext.Type returned by getType() for details on what the encapsulated returned value represents.
        Throws:
        java.lang.Exception - Exception submitting the topology.
        See Also:
        ContextProperties
      • submit

        java.util.concurrent.Future<T> submit(com.google.gson.JsonObject submission)
                                       throws java.lang.Exception
        Submit a topology} to this Streams context as a JSON object. The JSON object contains two keys:
        • deploy - Optional - Deployment information.
        • graph - Required - JSON representation of the topology graph.
        Parameters:
        submission - Topology and deployment info to be submitted.
        Returns:
        Future for the submission, see the descriptions for the StreamsContext.Type returned by getType() for details on what the encapsulated returned value represents.
        Throws:
        java.lang.Exception - Exception submitting the topology.
        See Also:
        ContextProperties
streamsx.topology 2.1 @ IBMStreams GitHub