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);
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
*
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;
}