Class StreamRouterEngine

java.lang.Object
org.graylog2.streams.StreamRouterEngine

public class StreamRouterEngine extends Object
Stream routing engine to select matching streams for a message. This class is NOT thread-safe! Use one instance per thread.
  • Constructor Details

  • Method Details

    • getStreams

      public List<Stream> getStreams()
      Returns the list of streams that are processed by the engine.
      Returns:
      the list of streams
    • getFingerprint

      public String getFingerprint()
      Returns the fingerprint of the engine instance.
      Returns:
      the fingerprint
    • match

      public List<Stream> match(Message message)
      Returns a list of matching streams for the given message.
      Parameters:
      message - the message
      Returns:
      the list of matching streams
    • testMatch

      public List<StreamRouterEngine.StreamTestMatch> testMatch(Message message)
      Returns a list of stream rule matches. Can be used to test streams and stream rule matches. This is meant for testing, do NOT use in production processing pipeline! (use match instead)
      Parameters:
      message - the message to match streams on