X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fabstract-topology%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fnetconf%2Ftopology%2FRoleChangeListener.java;fp=opendaylight%2Fnetconf%2Fabstract-topology%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fnetconf%2Ftopology%2FRoleChangeListener.java;h=0000000000000000000000000000000000000000;hb=4c0c091813aea131d32dc70c5121a450eb9b7291;hp=5cf4250bccf7e0749f1887af7398652a47ff53c2;hpb=a63cd90c78847178c8ab9a970b2189bdab572a80;p=netconf.git diff --git a/opendaylight/netconf/abstract-topology/src/main/java/org/opendaylight/netconf/topology/RoleChangeListener.java b/opendaylight/netconf/abstract-topology/src/main/java/org/opendaylight/netconf/topology/RoleChangeListener.java deleted file mode 100644 index 5cf4250bcc..0000000000 --- a/opendaylight/netconf/abstract-topology/src/main/java/org/opendaylight/netconf/topology/RoleChangeListener.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ - -package org.opendaylight.netconf.topology; - -import com.google.common.annotations.Beta; - -/** - * A listener that recieves {@link #onRoleChanged(RoleChangeDTO)} callbacks when a role change occurs - */ -@Beta -public interface RoleChangeListener { - - /** - * Called when a role change occurs - * @param roleChangeDTO a DTO that wraps the current ownership status - */ - void onRoleChanged(RoleChangeDTO roleChangeDTO); - - /** - * A DTO that wraps an ownership change status - */ - class RoleChangeDTO { - - private final boolean wasOwner; - private final boolean isOwner; - private final boolean hasOwner; - - public RoleChangeDTO(boolean wasOwner, boolean isOwner, boolean hasOwner) { - this.wasOwner = wasOwner; - this.isOwner = isOwner; - this.hasOwner = hasOwner; - } - - public boolean wasOwner() { - return wasOwner; - } - - public boolean isOwner() { - return isOwner; - } - - public boolean hasOwner() { - return hasOwner; - } - } -}