Move MXBean definitions to cds-mgmt-api
[controller.git] / opendaylight / md-sal / cds-mgmt-api / src / main / java / org / opendaylight / controller / cluster / mgmt / api / DataTreeListenerInfo.java
1 /*
2  * Copyright (c) 2017 Inocybe Technologies 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.cluster.mgmt.api;
9
10 import static java.util.Objects.requireNonNull;
11
12 import javax.management.ConstructorParameters;
13 import org.eclipse.jdt.annotation.NonNullByDefault;
14
15 /**
16  * Information about a registered listener.
17  *
18  * @author Thomas Pantelis
19  */
20 @NonNullByDefault
21 public final class DataTreeListenerInfo {
22     private final String listener;
23     private final String registeredPath;
24     private final boolean isEnabled;
25     private final long notificationCount;
26
27     @ConstructorParameters({"listener","registeredPath", "isEnabled", "notificationCount"})
28     public DataTreeListenerInfo(final String listener, final String registeredPath, final boolean isEnabled,
29             final long notificationCount) {
30         this.listener = requireNonNull(listener);
31         this.registeredPath = requireNonNull(registeredPath);
32         this.isEnabled = isEnabled;
33         this.notificationCount = notificationCount;
34     }
35
36     public String getListener() {
37         return listener;
38     }
39
40     public String getRegisteredPath() {
41         return registeredPath;
42     }
43
44     public boolean isEnabled() {
45         return isEnabled;
46     }
47
48     public long getNotificationCount() {
49         return notificationCount;
50     }
51 }