All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.graylog2.streams.StreamService Maven / Gradle / Ivy

There is a newer version: 6.0.2
Show newest version
/**
 * This file is part of Graylog.
 *
 * Graylog is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Graylog is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Graylog.  If not, see .
 */
package org.graylog2.streams;

import org.graylog2.database.NotFoundException;
import org.graylog2.plugin.alarms.AlertCondition;
import org.graylog2.plugin.database.PersistedService;
import org.graylog2.plugin.database.ValidationException;
import org.graylog2.plugin.streams.Output;
import org.graylog2.plugin.streams.Stream;
import org.graylog2.plugin.streams.StreamRule;
import org.graylog2.rest.resources.streams.requests.CreateStreamRequest;

import java.util.List;
import java.util.Map;

public interface StreamService extends PersistedService {
    Stream create(Map fields);

    Stream create(CreateStreamRequest request, String userId);

    Stream load(String id) throws NotFoundException;

    void destroy(Stream stream) throws NotFoundException;

    List loadAll();

    List loadAllEnabled();

    /**
     * @return the total number of streams
     */
    long count();

    void pause(Stream stream) throws ValidationException;

    void resume(Stream stream) throws ValidationException;

    List getStreamRules(Stream stream) throws NotFoundException;

    List loadAllWithConfiguredAlertConditions();

    List getAlertConditions(Stream stream);

    AlertCondition getAlertCondition(Stream stream, String conditionId) throws NotFoundException;

    void addAlertCondition(Stream stream, AlertCondition condition) throws ValidationException;

    void updateAlertCondition(Stream stream, AlertCondition condition) throws ValidationException;

    void removeAlertCondition(Stream stream, String conditionId);

    void addAlertReceiver(Stream stream, String type, String name);

    void removeAlertReceiver(Stream stream, String type, String name);

    void addOutput(Stream stream, Output output);

    void removeOutput(Stream stream, Output output);

    void removeOutputFromAllStreams(Output output);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy