com.bytex.snamp.connector.dataStream.NotificationParser Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of data-stream Show documentation
Show all versions of data-stream Show documentation
Framework for writing connectors based on message processing
The newest version!
package com.bytex.snamp.connector.dataStream;
import javax.management.Notification;
import java.util.Map;
import java.util.stream.Stream;
/**
* Represents notification parser.
* @author Roman Sakno
* @version 2.0
* @since 2.0
*/
@FunctionalInterface
public interface NotificationParser {
/**
* Converts headers and body into stream of {@link Notification}s.
* @param headers A headers of the input message. Cannot be {@literal null}.
* @param body Body of the message.
* @return Stream of notifications restored from the message headers and body.
* @throws Exception Unable to parse notification.
*/
Stream parse(final Map headers, final Object body) throws Exception;
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy