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
9 package org.opendaylight.netconf.topology;
11 import com.google.common.annotations.Beta;
14 * A listener that recieves {@link #onRoleChanged(RoleChangeDTO)} callbacks when a role change occurs
17 public interface RoleChangeListener {
20 * Called when a role change occurs
21 * @param roleChangeDTO a DTO that wraps the current ownership status
23 void onRoleChanged(RoleChangeDTO roleChangeDTO);
26 * A DTO that wraps an ownership change status
30 private final boolean wasOwner;
31 private final boolean isOwner;
32 private final boolean hasOwner;
34 public RoleChangeDTO(boolean wasOwner, boolean isOwner, boolean hasOwner) {
35 this.wasOwner = wasOwner;
36 this.isOwner = isOwner;
37 this.hasOwner = hasOwner;
40 public boolean wasOwner() {
44 public boolean isOwner() {
48 public boolean hasOwner() {