Class InputStreamMonitor

All Implemented Interfaces:
Iterable<ComponentType>, Runnable, Channel, ComponentType, Eligible, Manager

public class InputStreamMonitor extends Component implements Runnable
A component that watches for new input on an InputStream.

If new input becomes available, it is fired as Input event.

This component should only be used to monitor an input stream that is available during the complete lifetime of the application. A typical usage is to make data from System.in available as events.

  • Constructor Details

    • InputStreamMonitor

      public InputStreamMonitor(Channel componentChannel, InputStream input, Channel dataChannel)
      Creates a new input stream monitor with its channel set to the given channel.

      The channel is also used for firing the Input events.

      Parameters:
      componentChannel - the component channel
      input - the input stream
      dataChannel - the data channel
    • InputStreamMonitor

      public InputStreamMonitor(Channel componentChannel, InputStream input)
      Creates a new input stream monitor with its channel set to the given channel.

      The channel is also used for firing the Input events.

      Parameters:
      componentChannel - the component channel
      input - the input
  • Method Details