2 * Copyright (c) 2015 Brocade Communications 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.cluster.entityownership.messages;
10 import static java.util.Objects.requireNonNull;
12 import org.eclipse.jdt.annotation.NonNullByDefault;
13 import org.opendaylight.mdsal.eos.dom.api.DOMEntityOwnershipListener;
16 * Message sent to the local EntityOwnershipShard to register an EntityOwnershipListener.
18 * @author Thomas Pantelis
21 public class RegisterListenerLocal {
22 private final DOMEntityOwnershipListener listener;
23 private final String entityType;
25 public RegisterListenerLocal(final DOMEntityOwnershipListener listener, final String entityType) {
26 this.listener = requireNonNull(listener, "listener cannot be null");
27 this.entityType = requireNonNull(entityType, "entityType cannot be null");
30 public DOMEntityOwnershipListener getListener() {
34 public String getEntityType() {
39 public String toString() {
40 return "RegisterListenerLocal [entityType=" + entityType + ", listener=" + listener + "]";