X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=openstack%2Fnet-virt%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fovsdb%2Fopenstack%2Fnetvirt%2FAbstractEvent.java;h=1848ad705fde9880cb4b6f19671ca5c1f62f6b6c;hb=f7d19ae25237e6ece8855c2a3679e2055ae12b0e;hp=31320efe985e24cfbd22f5ce7b5c883bbd7042c4;hpb=079716e7a76ebd57aae124c742fb0488e17bf7ab;p=netvirt.git diff --git a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/AbstractEvent.java b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/AbstractEvent.java index 31320efe98..1848ad705f 100644 --- a/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/AbstractEvent.java +++ b/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/AbstractEvent.java @@ -1,11 +1,9 @@ /* - * Copyright (C) 2014 Red Hat, Inc. + * Copyright (c) 2014, 2015 Red Hat, 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 - * - * Authors : Dave Tucker, Flavio Fernandes */ package org.opendaylight.ovsdb.openstack.netvirt; @@ -16,6 +14,7 @@ import org.opendaylight.ovsdb.openstack.netvirt.api.Action; * Abstract class for events used by neutron northbound and southbound events. */ public abstract class AbstractEvent { + public enum HandlerType { SOUTHBOUND, NEUTRON_FLOATING_IP, @@ -27,7 +26,8 @@ public abstract class AbstractEvent { NEUTRON_FWAAS, NEUTRON_LOAD_BALANCER, NEUTRON_LOAD_BALANCER_POOL, - NEUTRON_LOAD_BALANCER_POOL_MEMBER; + NEUTRON_LOAD_BALANCER_POOL_MEMBER, + NODE; public static final int size = HandlerType.values().length; } @@ -68,23 +68,30 @@ public abstract class AbstractEvent { @Override public boolean equals(Object obj) { - if (this == obj) + if (this == obj) { return true; - if (obj == null) + } + if (obj == null) { return false; - if (getClass() != obj.getClass()) + } + if (getClass() != obj.getClass()) { return false; + } AbstractEvent other = (AbstractEvent) obj; if (handlerType == null) { - if (other.handlerType != null) + if (other.handlerType != null) { return false; - } else if (!handlerType.equals(other.handlerType)) + } + } else if (!handlerType.equals(other.handlerType)) { return false; + } if (action == null) { - if (other.action != null) + if (other.action != null) { return false; - } else if (!action.equals(other.action)) + } + } else if (!action.equals(other.action)) { return false; + } return true; } }