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.protocol.vendor;
20 import org.openflow.protocol.Instantiable;
23 * Subclass of OFVendorDataType that works with any vendor data format that
24 * begins with a integral value to indicate the format of the remaining data.
25 * It maps from the per-vendor-id integral data type code to the object
26 * used to instantiate the class associated with that vendor data type.
28 * @author Rob Vaterlaus (rob.vaterlaus@bigswitch.com)
30 public class OFBasicVendorDataType extends OFVendorDataType {
33 * The data type value at the beginning of the vendor data.
38 * Construct an empty (i.e. no specified data type value) vendor data type.
40 public OFBasicVendorDataType() {
46 * Store some information about the vendor data type, including wire protocol
47 * type number, derived class and instantiator.
49 * @param type Wire protocol number associated with this vendor data type
50 * @param instantiator An Instantiator<OFVendorData> implementation that
51 * creates an instance of an appropriate subclass of OFVendorData.
53 public OFBasicVendorDataType(long type, Instantiable<OFVendorData> instantiator) {
59 * @return Returns the wire protocol value corresponding to this OFVendorDataType
61 public long getTypeValue() {
66 * @param type the wire protocol value for this data type
68 public void setTypeValue(long type) {