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.app.impl;
10 import static java.util.Objects.requireNonNull;
12 import org.opendaylight.controller.messagebus.spi.EventSource;
13 import org.opendaylight.controller.messagebus.spi.EventSourceRegistration;
14 import org.opendaylight.yangtools.concepts.AbstractObjectRegistration;
16 @Deprecated(forRemoval = true)
17 class EventSourceRegistrationImpl<T extends EventSource> extends AbstractObjectRegistration<T>
18 implements EventSourceRegistration<T> {
20 private final EventSourceTopology eventSourceTopology;
25 * @param instance of EventSource that has been registered by
26 * {@link EventSourceRegistryImpl#registerEventSource(Node, EventSource)}
28 EventSourceRegistrationImpl(final T instance, final EventSourceTopology eventSourceTopology) {
30 this.eventSourceTopology = requireNonNull(eventSourceTopology);
34 protected void removeRegistration() {
35 this.eventSourceTopology.unRegister(getInstance());