2 * Copyright (c) 2020 PANTHEON.tech, s.r.o. 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.mdsal.replicate.netty;
10 import io.netty.bootstrap.Bootstrap;
11 import io.netty.bootstrap.ServerBootstrap;
13 import org.eclipse.jdt.annotation.NonNull;
14 import org.osgi.service.component.annotations.Activate;
15 import org.osgi.service.component.annotations.Component;
16 import org.osgi.service.component.annotations.Deactivate;
18 @Component(immediate = true, service = BootstrapSupport.class)
19 public class OSGiBootstrapSupportProvider implements BootstrapSupport {
20 private AbstractBootstrapSupport delegate = null;
23 void activate(final Map<String, Object> properties) {
24 delegate = AbstractBootstrapSupport.create();
28 void deactivate() throws InterruptedException {
34 public @NonNull Bootstrap newBootstrap() {
35 return delegate.newBootstrap();
39 public @NonNull ServerBootstrap newServerBootstrap() {
40 return delegate.newServerBootstrap();