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;
12 import org.opendaylight.controller.netconf.util.messages.NetconfMessageFactory;
13 import org.opendaylight.protocol.framework.ProtocolMessageDecoder;
14 import org.opendaylight.protocol.framework.ProtocolMessageEncoder;
16 public class NetconfHandlerFactory {
17 private final NetconfMessageFactory msgFactory = new NetconfMessageFactory();
19 public ChannelHandler[] getEncoders() {
20 return new ChannelHandler[] { new ProtocolMessageEncoder(this.msgFactory) };
23 public ChannelHandler[] getDecoders() {
24 return new ChannelHandler[] { new ProtocolMessageDecoder(this.msgFactory) };