Merge "Add missing copyright text"
[controller.git] / opendaylight / md-sal / messagebus-spi / src / main / java / org / opendaylight / controller / messagebus / spi / EventSource.java
1 /*
2  * Copyright (c) 2015 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.controller.messagebus.spi;
9
10 import java.util.List;
11
12 import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.messagebus.eventsource.rev141202.EventSourceService;
13 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeKey;
14 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
15
16 /**
17  * Event source is a node in topology which is able to produces notifications.
18  * To register event source you use {@link EventSourceRegistry#registerEventSource(EventSource)()}.
19  * EventSourceRegistry will request registered event source to publish notifications
20  * whenever EventSourceRegistry has been asked to publish a certain type of notifications.
21  * EventSourceRegistry will call method JoinTopic to request EventSource to publish notification.
22  * Event source must implement method JoinTopic (from superinterface {@link EventSourceService}).
23  */
24
25 public interface EventSource extends EventSourceService, AutoCloseable {
26
27     /**
28      * Identifier of node associated with event source
29      *
30      * @return instance of NodeKey
31      */
32     NodeKey getSourceNodeKey();
33
34     /**
35      * List the types of notifications which source can produce.
36      *
37      * @return list of available notification
38      */
39     List<SchemaPath> getAvailableNotifications();
40
41 }