use of org.opendaylight.protocol.pcep.PCEPDispatcherDependencies in project bgpcep by opendaylight.
the class PCEPDispatcherImpl method createServer.
@Override
public final synchronized ChannelFuture createServer(final PCEPDispatcherDependencies dispatcherDependencies) {
this.keys = dispatcherDependencies.getKeys();
@SuppressWarnings("unchecked") final ChannelPipelineInitializer initializer = (ch, promise) -> {
ch.pipeline().addLast(this.hf.getDecoders());
ch.pipeline().addLast("negotiator", this.snf.getSessionNegotiator(dispatcherDependencies, ch, promise));
ch.pipeline().addLast(this.hf.getEncoders());
};
final ServerBootstrap b = createServerBootstrap(initializer);
final InetSocketAddress address = dispatcherDependencies.getAddress();
final ChannelFuture f = b.bind(address);
LOG.debug("Initiated server {} at {}.", f, address);
this.keys = KeyMapping.getKeyMapping();
return f;
}
Aggregations