2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.controller.netconf.util.handler;
10 import io.netty.channel.ChannelHandler;
11 import org.opendaylight.controller.netconf.api.NetconfMessage;
12 import org.opendaylight.controller.netconf.util.messages.NetconfMessageFactory;
13 import org.opendaylight.protocol.framework.ProtocolHandlerFactory;
14 import org.opendaylight.protocol.framework.ProtocolMessageDecoder;
15 import org.opendaylight.protocol.framework.ProtocolMessageEncoder;
17 public class NetconfHandlerFactory extends ProtocolHandlerFactory<NetconfMessage> {
19 public NetconfHandlerFactory(final NetconfMessageFactory msgFactory) {
24 public ChannelHandler[] getEncoders() {
25 return new ChannelHandler[] { new ProtocolMessageEncoder(this.msgFactory) };
29 public ChannelHandler[] getDecoders() {
30 return new ChannelHandler[] { new ProtocolMessageDecoder(this.msgFactory) };