59ef33cfecd03b20ea3fc5fad76da7a66fe89313
[onosfw.git] /
1 /*
2  * Copyright 2015 Open Networking Laboratory
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 package org.onosproject.openflow.controller;
17
18 import org.jboss.netty.buffer.ChannelBuffer;
19 import org.projectfloodlight.openflow.protocol.OFMessage;
20 import org.projectfloodlight.openflow.protocol.OFType;
21 import org.projectfloodlight.openflow.protocol.OFVersion;
22
23 import com.google.common.hash.PrimitiveSink;
24 /**
25  * Used to support for the third party privacy flow rule.
26  * it implements OFMessage interface to use exist adapter API.
27  */
28 public class ThirdPartyMessage implements OFMessage {
29
30     private final byte[] payLoad; //privacy flow rule
31
32     public ThirdPartyMessage(byte[] payLoad) {
33         this.payLoad = payLoad;
34     }
35
36     public byte[] payLoad() {
37         return payLoad;
38     }
39
40     @Override
41     public void putTo(PrimitiveSink sink) {
42      // Do nothing here for now.
43     }
44
45     @Override
46     public OFVersion getVersion() {
47      // Do nothing here for now.
48         return null;
49     }
50
51     @Override
52     public OFType getType() {
53      // Do nothing here for now.
54         return null;
55     }
56
57     @Override
58     public long getXid() {
59      // Do nothing here for now.
60         return 0;
61     }
62
63     @Override
64     public void writeTo(ChannelBuffer channelBuffer) {
65      // Do nothing here for now.
66     }
67
68     @Override
69     public Builder createBuilder() {
70      // Do nothing here for now.
71         return null;
72     }
73
74 }