2 * Copyright (c) 2013 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.config.manager.impl.jmx;
10 public class ServiceReference {
11 private final String serviceInterfaceName;
12 private final String refName;
14 public ServiceReference(final String serviceInterfaceName, final String refName) {
15 this.serviceInterfaceName = serviceInterfaceName;
16 this.refName = refName;
19 public String getServiceInterfaceQName() {
20 return serviceInterfaceName;
23 public String getRefName() {
28 public boolean equals(final Object o) {
32 if (o == null || getClass() != o.getClass()) {
36 ServiceReference that = (ServiceReference) o;
38 if (!refName.equals(that.refName)) {
41 if (!serviceInterfaceName.equals(that.serviceInterfaceName)) {
49 public int hashCode() {
50 int result = serviceInterfaceName.hashCode();
51 result = 31 * result + refName.hashCode();
56 public String toString() {
57 return "ServiceReference{" +
58 "serviceInterfaceName='" + serviceInterfaceName + '\'' +
59 ", refName='" + refName + '\'' +