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 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.ibm.json.java.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 1.5 @ IBMStreams GitHub