Logstash Java input interface. Inputs produce events that flow through the Logstash event pipeline. Inputs are flexible and may produce events through many different mechanisms including: a pull mechanism such as periodic queries of external database a push mechanism such
| 37 | * Logstash will run as long as any one of its inputs is still producing events. |
| 38 | */ |
| 39 | public interface Input extends Plugin { |
| 40 | |
| 41 | /** |
| 42 | * Start the input and begin pushing events to the supplied {@link Consumer} instance. If the input produces |
| 43 | * an infinite stream of events, this method should loop until a {@link #stop()} request is made. If the |
| 44 | * input produces a finite stream of events, this method should terminate when the last event in the stream |
| 45 | * is produced. |
| 46 | * @param writer Consumer to which events should be pushed |
| 47 | */ |
| 48 | void start(Consumer<Map<String, Object>> writer); |
| 49 | |
| 50 | /** |
| 51 | * Notifies the input to stop producing events. Inputs stop both asynchronously and cooperatively. Use the |
| 52 | * {@link #awaitStop()} method to block until the input has completed the stop process. |
| 53 | */ |
| 54 | void stop(); |
| 55 | |
| 56 | /** |
| 57 | * Blocks until the input has stopped producing events. Note that this method should <b>not</b> signal the |
| 58 | * input to stop as the {@link #stop()} method does. |
| 59 | * @throws InterruptedException On Interrupt |
| 60 | */ |
| 61 | void awaitStop() throws InterruptedException; |
| 62 | |
| 63 | } |
no outgoing calls
no test coverage detected