4804e16fe2a315b87966ed62ea48e9849628ae9d
[netconf.git] / restconf / restconf-nb-bierman02 / src / main / java / org / opendaylight / netconf / sal / streams / listeners / BaseListenerInterface.java
1 /*
2  * Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.netconf.sal.streams.listeners;
9
10 import io.netty.channel.Channel;
11 import java.util.Set;
12
13 /**
14  * Base interface for both listeners({@link ListenerAdapter},
15  * {@link NotificationListenerAdapter}).
16  */
17 interface BaseListenerInterface extends AutoCloseable {
18
19     /**
20      * Return all subscribers of listener.
21      *
22      * @return set of subscribers
23      */
24     Set<Channel> getSubscribers();
25
26     /**
27      * Checks if exists at least one {@link Channel} subscriber.
28      *
29      * @return True if exist at least one {@link Channel} subscriber, false
30      *         otherwise.
31      */
32     boolean hasSubscribers();
33
34     /**
35      * Get name of stream.
36      *
37      * @return stream name
38      */
39     String getStreamName();
40
41     /**
42      * Get output type.
43      *
44      * @return outputType
45      */
46     String getOutputType();
47 }