2 * Copyright 2011, Big Switch Networks, Inc.
3 * Originally created by David Erickson & Rob Sherwood, Stanford University
5 * Licensed under the Apache License, Version 2.0 (the "License"); you may
6 * not use this file except in compliance with the License. You may obtain
7 * a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 * License for the specific language governing permissions and limitations
18 package org.openflow.vendor.nicira;
20 import org.openflow.protocol.Instantiable;
21 import org.openflow.protocol.vendor.OFVendorData;
24 * Subclass of OFVendorData representing the vendor data associated with
25 * a role request vendor extension.
27 * @author Rob Vaterlaus (rob.vaterlaus@bigswitch.com)
29 public class OFRoleRequestVendorData extends OFRoleVendorData {
31 protected static Instantiable<OFVendorData> instantiable =
32 new Instantiable<OFVendorData>() {
33 public OFVendorData instantiate() {
34 return new OFRoleRequestVendorData();
39 * @return a subclass of Instantiable<OFVendorData> that instantiates
40 * an instance of OFRoleRequestVendorData.
42 public static Instantiable<OFVendorData> getInstantiable() {
47 * The data type value for a role request
49 public static final int NXT_ROLE_REQUEST = 10;
52 * Construct a role request vendor data with an unspecified role value.
54 public OFRoleRequestVendorData() {
55 super(NXT_ROLE_REQUEST);
59 * Construct a role request vendor data with the specified role value.
60 * @param role the role value for the role request. Should be one of
61 * NX_ROLE_OTHER, NX_ROLE_MASTER or NX_ROLE_SLAVE.
63 public OFRoleRequestVendorData(int role) {
64 super(NXT_ROLE_REQUEST, role);