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.protocol.bgp.rib.impl;
10 import io.netty.channel.ChannelHandlerContext;
12 import java.util.Timer;
14 import org.opendaylight.protocol.bgp.rib.impl.spi.BGPConnection;
15 import org.opendaylight.protocol.framework.ProtocolConnection;
16 import org.opendaylight.protocol.framework.ProtocolMessageFactory;
17 import org.opendaylight.protocol.framework.ProtocolSession;
18 import org.opendaylight.protocol.framework.ProtocolSessionFactory;
19 import org.opendaylight.protocol.framework.SessionParent;
24 public final class BGPSessionFactory implements ProtocolSessionFactory {
26 private final ProtocolMessageFactory parser;
28 public BGPSessionFactory(final ProtocolMessageFactory parser) {
33 public ProtocolSession getProtocolSession(final SessionParent parent, final Timer timer, final ProtocolConnection connection,
34 final int sessionId, final ChannelHandlerContext ctx) {
35 return new BGPSessionImpl(parent, timer, (BGPConnection) connection, sessionId, this.parser, ctx);