summaryrefslogtreecommitdiffstats
path: root/netconf/restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/streams/listeners/BaseListenerInterface.java
blob: 4804e16fe2a315b87966ed62ea48e9849628ae9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
 * Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
 * and is available at http://www.eclipse.org/legal/epl-v10.html
 */
package org.opendaylight.netconf.sal.streams.listeners;

import io.netty.channel.Channel;
import java.util.Set;

/**
 * Base interface for both listeners({@link ListenerAdapter},
 * {@link NotificationListenerAdapter}).
 */
interface BaseListenerInterface extends AutoCloseable {

    /**
     * Return all subscribers of listener.
     *
     * @return set of subscribers
     */
    Set<Channel> getSubscribers();

    /**
     * Checks if exists at least one {@link Channel} subscriber.
     *
     * @return True if exist at least one {@link Channel} subscriber, false
     *         otherwise.
     */
    boolean hasSubscribers();

    /**
     * Get name of stream.
     *
     * @return stream name
     */
    String getStreamName();

    /**
     * Get output type.
     *
     * @return outputType
     */
    String getOutputType();
}