blob: 5b6c2a3667a73930feb06bd0f5387591961db20c [file] [log] [blame]
Ray Milkey4bf8a582015-11-04 08:26:19 -08001/*
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 */
16package org.onosproject.openflow;
17
18import org.jboss.netty.channel.Channel;
19import org.jboss.netty.channel.ChannelEvent;
20import org.jboss.netty.channel.ChannelHandler;
21import org.jboss.netty.channel.ChannelHandlerContext;
22import org.jboss.netty.channel.ChannelPipeline;
23
24/**
25 * Adapter for testing against a netty channel handler context.
26 */
27public class ChannelHandlerContextAdapter implements ChannelHandlerContext {
28 @Override
29 public Channel getChannel() {
30 return null;
31 }
32
33 @Override
34 public ChannelPipeline getPipeline() {
35 return null;
36 }
37
38 @Override
39 public String getName() {
40 return null;
41 }
42
43 @Override
44 public ChannelHandler getHandler() {
45 return null;
46 }
47
48 @Override
49 public boolean canHandleUpstream() {
50 return false;
51 }
52
53 @Override
54 public boolean canHandleDownstream() {
55 return false;
56 }
57
58 @Override
59 public void sendUpstream(ChannelEvent channelEvent) {
60
61 }
62
63 @Override
64 public void sendDownstream(ChannelEvent channelEvent) {
65
66 }
67
68 @Override
69 public Object getAttachment() {
70 return null;
71 }
72
73 @Override
74 public void setAttachment(Object o) {
75
76 }
77}