org.projectfloodlight.openflow.protocol.OFMessage Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of openflowj Show documentation
Show all versions of openflowj Show documentation
OpenFlowJ API supporting OpenFlow versions 1.0 through 1.5.1, generated by LoxiGen
The newest version!
// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
// Copyright (c) 2011, 2012 Open Networking Foundation
// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
// This library was generated by the LoxiGen Compiler.
// See the file LICENSE.txt which should have been included in the source distribution
// Automatically generated by LOXI from template of_interface.java
// Do not modify
package org.projectfloodlight.openflow.protocol;
import org.projectfloodlight.openflow.protocol.*;
import org.projectfloodlight.openflow.protocol.action.*;
import org.projectfloodlight.openflow.protocol.actionid.*;
import org.projectfloodlight.openflow.protocol.bsntlv.*;
import org.projectfloodlight.openflow.protocol.errormsg.*;
import org.projectfloodlight.openflow.protocol.meterband.*;
import org.projectfloodlight.openflow.protocol.instruction.*;
import org.projectfloodlight.openflow.protocol.instructionid.*;
import org.projectfloodlight.openflow.protocol.match.*;
import org.projectfloodlight.openflow.protocol.stat.*;
import org.projectfloodlight.openflow.protocol.oxm.*;
import org.projectfloodlight.openflow.protocol.oxs.*;
import org.projectfloodlight.openflow.protocol.queueprop.*;
import org.projectfloodlight.openflow.types.*;
import org.projectfloodlight.openflow.util.*;
import org.projectfloodlight.openflow.exceptions.*;
import java.util.Map;
import io.netty.buffer.ByteBuf;
public interface OFMessage extends OFObject {
OFVersion getVersion();
OFType getType();
long getXid();
/**
* Compares the two messages for equality, ignoring the XID field.
*
* @param obj the other message to compare
* @return true if the messages are equal, ignoring the XID; false otherwise
*/
boolean equalsIgnoreXid(Object obj);
/**
* Computes the hashcode of the message, ignoring the XID field.
* This can be useful in hashing OFMessages where an OFMessage
* is "the same as" another OFMessage if all fields are equal
* except for possibly the XIDs, which may or may not be equal.
*
* The obvious problem is that existing hash data structure
* implementations will use OFMessage's hashCode() function instead.
* In order to use the functionality of hashCodeIgnoreXid(), one
* must wrap the OFMessage within a user-defined class, where this
* user-defined class is used as the key within a hash data structure,
* e.g. HashMap. The user-defined class' overrideen hashCode()
* function must explicitly invoke hashCodeIgnoreXid() when computing
* the hash of the OFMessage member instead of computing it using
* OFMessage's hashCode().
*
* @return the hashcode of the message, ignoring the XID
*/
int hashCodeIgnoreXid();
void writeTo(ByteBuf channelBuffer);
Builder createBuilder();
public interface Builder {
OFMessage build();
OFVersion getVersion();
OFType getType();
long getXid();
Builder setXid(long xid);
}
}