Class InputAdapter

  • All Implemented Interfaces:
    IInputAdapter, LocatedItem, Serializable

    public abstract class InputAdapter
    extends Operator
    implements IInputAdapter
    Convenience abstract base class for input adapters. Adapters are intended to exchange information between StreamBase applications and external data sources and sinks. Input adapters take information from outside of an application and provide it in the form of a stream or streams to the application.

    Input adapters should call Operator.sendOutput(int,Tuple) to provide tuples to the application.

    For in-depth information on implementing an input adapter, please see "Using the Embedded Adapter API" in the StreamBase documentation.

    See Also:
    Serialized Form
    • Constructor Detail

      • InputAdapter

        public InputAdapter()
    • Method Detail

      • processTuple

        public void processTuple​(int inputPort,
                                 Tuple tuple)
                          throws StreamBaseException
        Description copied from class: Operator
        This method will be called by the StreamBase server for each Tuple given to the Operator to process.

        By default the Tuple passed in is safe for storing and mutating after the return of processTuple. The details of this Tuple's life cycle can be controlled via Operator.setReuseTuple(boolean).

        Specified by:
        processTuple in class Operator
        inputPort - the input port that the tuple is from (ports are zero based)
        tuple - the tuple from the given input port
        StreamBaseException - Terminates the application.