X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fsal%2Fapi%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Faction%2FAction.java;h=1ff7ea1444052e84d36e4cf80b440ad9159cd01f;hp=8fc8fc16bf59b9f7248b093070783657f834c066;hb=4f623c74a703a31e787387b536981dcb344ca4f9;hpb=cc5814b25b247f5ffe0c17ede1850e71ca06eee6 diff --git a/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/action/Action.java b/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/action/Action.java index 8fc8fc16bf..1ff7ea1444 100644 --- a/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/action/Action.java +++ b/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/action/Action.java @@ -8,33 +8,28 @@ package org.opendaylight.controller.sal.action; -import java.io.Serializable; - import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.bind.annotation.XmlTransient; +import java.io.Serializable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; + /** * Represents the generic action to be applied to the matched * frame/packet/message */ @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) -@XmlSeeAlso({ Controller.class, Drop.class, Flood.class, FloodAll.class, HwPath.class, Loopback.class, Output.class, - PopVlan.class, PushVlan.class, SetDlDst.class, SetDlSrc.class, SetDlType.class, SetNwDst.class, SetNwSrc.class, - SetNwTos.class, SetTpDst.class, SetTpSrc.class, SetVlanCfi.class, SetVlanId.class, SetVlanPcp.class, - SwPath.class }) public abstract class Action implements Serializable { private static final long serialVersionUID = 1L; private static final Logger logger = LoggerFactory.getLogger(Action.class); private static boolean debug = false; // Enable to find where in the code an // invalid assignment is made - @XmlTransient + @XmlElement protected ActionType type; private transient boolean isValid = true; @@ -42,11 +37,6 @@ public abstract class Action implements Serializable { public Action() { } - /* - * public Action (ActionType type, Object value) { this.type = type; - * this.value = value; this.isValid = true; } - */ - /** * Checks if the passed value is in the valid range for this action * @@ -124,7 +114,7 @@ public abstract class Action implements Serializable { public int hashCode() { final int prime = 31; int result = 1; - result = prime * result + ((type == null) ? 0 : type.hashCode()); + result = prime * result + ((type == null) ? 0 : type.calculateConsistentHashCode()); return result; }