X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Farphandler%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Farphandler%2FARPRequest.java;fp=opendaylight%2Farphandler%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Farphandler%2FARPRequest.java;h=0000000000000000000000000000000000000000;hb=42c32160bfd41de57189bb246fec5ffb48ed8e9e;hp=051635ad53f85f5a2344b0f2b23905de958781c1;hpb=edf5bfcee83c750853253ccfd991ba7000f5f65b;p=controller.git diff --git a/opendaylight/arphandler/src/main/java/org/opendaylight/controller/arphandler/ARPRequest.java b/opendaylight/arphandler/src/main/java/org/opendaylight/controller/arphandler/ARPRequest.java deleted file mode 100644 index 051635ad53..0000000000 --- a/opendaylight/arphandler/src/main/java/org/opendaylight/controller/arphandler/ARPRequest.java +++ /dev/null @@ -1,107 +0,0 @@ - -/* - * Copyright (c) 2013 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.controller.arphandler; - -import java.net.InetAddress; - -import org.opendaylight.controller.hosttracker.hostAware.HostNodeConnector; -import org.opendaylight.controller.switchmanager.Subnet; -/* - * ARP Request event wrapper Consists of IP and Subnet (and a - * HostNodeConnector if is unicast) For unicast request, construct with a - * specified host - */ -public class ARPRequest extends ARPEvent { - private static final long serialVersionUID = 1L; - private final Subnet subnet; - private final HostNodeConnector host; - - @Override - public int hashCode() { - final int prime = 31; - int result = super.hashCode(); - result = prime * result + ((host == null) ? 0 : host.hashCode()); - result = prime * result + ((subnet == null) ? 0 : subnet.hashCode()); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (obj == null) { - return false; - } - if (!(obj instanceof ARPRequest)) { - return false; - } - ARPRequest other = (ARPRequest) obj; - if (host == null) { - if (other.host != null) { - return false; - } - } else if (!host.equals(other.host)) { - return false; - } - if (subnet == null) { - if (other.subnet != null) { - return false; - } - } else if (!subnet.equals(other.subnet)) { - return false; - } - return true; - } - - // broadcast - public ARPRequest(InetAddress ip, Subnet subnet) { - super(ip); - this.subnet = subnet; - this.host = null; - } - - // unicast - public ARPRequest(HostNodeConnector host, Subnet subnet) { - super(host.getNetworkAddress()); - this.host = host; - this.subnet = subnet; - } - - public Subnet getSubnet() { - return subnet; - } - - public HostNodeConnector getHost() { - return host; - } - - /* - * (non-Javadoc) - * - * @see java.lang.Object#toString() - */ - @Override - public String toString() { - StringBuilder builder = new StringBuilder(); - builder.append("ARPRequest ["); - if (subnet != null) { - builder.append("subnet=") - .append(subnet) - .append(", "); - } - if (host != null) { - builder.append("host=") - .append(host); - } - builder.append("]"); - return builder.toString(); - } -}