2 * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
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
8 package org.opendaylight.controller.messagebus.spi;
11 * EventSourceRegistry is used to register {@link EventSource}.
13 public interface EventSourceRegistry extends AutoCloseable {
16 * Registers the given EventSource for public consumption. The EventSource is
17 * associated with the node identified via {@link EventSource#getSourceNodeKey}.
19 * @param eventSource the EventSource instance to register
20 * @return an EventSourceRegistration instance that is used to unregister the EventSource via {@link EventSourceRegistration#close()}.
22 <T extends EventSource> EventSourceRegistration<T> registerEventSource(T eventSource);