blob: a3be413580af5e8f5b80c6440a7ea298b82df0c5 [file] [log] [blame]
Hyunsun Moon90163ba2016-10-12 13:35:14 -07001/*
2 * Copyright 2017-present 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.ofagent.impl;
17
18import io.netty.channel.ChannelInitializer;
19import io.netty.channel.socket.SocketChannel;
20import org.onosproject.ofagent.api.OFSwitch;
21
22/**
23 * Implementation of OpenFlow channel initializer.
24 */
25public final class OFChannelInitializer extends ChannelInitializer<SocketChannel> {
26
27 private final OFSwitch ofSwitch;
28
29 /**
30 * Default constructor.
31 *
32 * @param ofSwitch openflow switch that owns this channel
33 */
34 public OFChannelInitializer(OFSwitch ofSwitch) {
35 this.ofSwitch = ofSwitch;
36 }
37
38 @Override
39 protected void initChannel(SocketChannel ch) throws Exception {
40
41 // TODO configure OF channel pipeline
42 }
43}