3 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
5 * This program and the accompanying materials are made available under the
6 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
7 * and is available at http://www.eclipse.org/legal/epl-v10.html
10 package org.opendaylight.controller.protocol_plugin.openflow.core.internal;
12 import org.apache.commons.lang3.builder.EqualsBuilder;
13 import org.apache.commons.lang3.builder.HashCodeBuilder;
14 import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
15 import org.openflow.protocol.OFMessage;
18 * This class describes an OpenFlow message with priority
20 class PriorityMessage {
24 public PriorityMessage(OFMessage msg, int priority) {
26 this.priority = priority;
29 public OFMessage getMsg() {
33 public void setMsg(OFMessage msg) {
37 public int getPriority() {
41 public void setPriority(int priority) {
42 this.priority = priority;
46 public int hashCode() {
47 return HashCodeBuilder.reflectionHashCode(this);
51 public boolean equals(Object obj) {
52 return EqualsBuilder.reflectionEquals(this, obj);
56 public String toString() {
57 return "PriorityMessage[" + ReflectionToStringBuilder.toString(this) + "]";