8108afe912d56f4f34a08196125a79d252dd7f59
[onosfw.git] /
1 package org.onosproject.openflow.controller;
2
3 import org.jboss.netty.buffer.ChannelBuffer;
4 import org.projectfloodlight.openflow.protocol.OFMessage;
5 import org.projectfloodlight.openflow.protocol.OFType;
6 import org.projectfloodlight.openflow.protocol.OFVersion;
7
8 import com.google.common.hash.PrimitiveSink;
9 /**
10  * Used to support for the third party privacy flow rule.
11  * it implements OFMessage interface to use exist adapter API.
12  */
13 public class ThirdPartyMessage implements OFMessage {
14
15     private final byte[] payLoad; //privacy flow rule
16
17     public ThirdPartyMessage(byte[] payLoad) {
18         this.payLoad = payLoad;
19     }
20
21     public byte[] payLoad() {
22         return payLoad;
23     }
24
25     @Override
26     public void putTo(PrimitiveSink sink) {
27      // Do nothing here for now.
28     }
29
30     @Override
31     public OFVersion getVersion() {
32      // Do nothing here for now.
33         return null;
34     }
35
36     @Override
37     public OFType getType() {
38      // Do nothing here for now.
39         return null;
40     }
41
42     @Override
43     public long getXid() {
44      // Do nothing here for now.
45         return 0;
46     }
47
48     @Override
49     public void writeTo(ChannelBuffer channelBuffer) {
50      // Do nothing here for now.
51     }
52
53     @Override
54     public Builder createBuilder() {
55      // Do nothing here for now.
56         return null;
57     }
58
59 }