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.util.concurrent.Future;
12 import org.opendaylight.protocol.bgp.parser.BGPSession;
13 import org.opendaylight.protocol.bgp.rib.impl.spi.BGPConnection;
14 import org.opendaylight.protocol.bgp.rib.impl.spi.BGPDispatcher;
15 import org.opendaylight.protocol.framework.Dispatcher;
16 import org.opendaylight.protocol.framework.ProtocolMessageFactory;
17 import org.opendaylight.protocol.framework.ReconnectStrategy;
20 * Implementation of BGPDispatcher.
22 public final class BGPDispatcherImpl implements BGPDispatcher {
24 private final Dispatcher dispatcher;
26 public BGPDispatcherImpl(final Dispatcher dispatcher) {
27 this.dispatcher = dispatcher;
31 public Future<? extends BGPSession> createClient(final BGPConnection connection, final ProtocolMessageFactory parser,
32 final ReconnectStrategy strategy) {
33 return this.dispatcher.createClient(connection, new BGPSessionFactory(parser), strategy);
36 public Dispatcher getDispatcher() {
37 return this.dispatcher;