Class InputAdapter

java.lang.Object
com.streambase.sb.operator.Operator
com.streambase.sb.adapter.InputAdapter
All Implemented Interfaces:
IInputAdapter, com.streambase.sb.util.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:
  • Constructor Details

    • InputAdapter

      public InputAdapter()
  • Method Details

    • 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
      Parameters:
      inputPort - the input port that the tuple is from (ports are zero based)
      tuple - the tuple from the given input port
      Throws:
      StreamBaseException - Terminates the application.