Search in sources :

Example 1 with LispXtrSouthboundHandler

use of org.opendaylight.lispflowmapping.southbound.lisp.LispXtrSouthboundHandler in project lispflowmapping by opendaylight.

the class LispSouthboundPlugin method init.

public void init() {
    LOG.info("LISP (RFC6830) Southbound Plugin is initializing...");
    synchronized (startLock) {
        this.akdb = new AuthKeyDb(new HashMapDb());
        this.authenticationKeyDataListener = new AuthenticationKeyDataListener(dataBroker, akdb);
        this.dsbe = new DataStoreBackEnd(dataBroker);
        restoreDaoFromDatastore();
        LispSouthboundHandler lsbh = new LispSouthboundHandler(this);
        this.lispSouthboundHandler = lsbh;
        LispXtrSouthboundHandler lxsbh = new LispXtrSouthboundHandler(this);
        this.lispXtrSouthboundHandler = lxsbh;
        if (Epoll.isAvailable()) {
            eventLoopGroup = new EpollEventLoopGroup(numChannels, threadFactory);
            channelType = EpollDatagramChannel.class;
            bootstrap.option(ChannelOption.ALLOCATOR, PooledByteBufAllocator.DEFAULT);
            bootstrap.option(EpollChannelOption.SO_REUSEPORT, true);
            LOG.debug("Using Netty Epoll for UDP sockets");
        } else {
            eventLoopGroup = new NioEventLoopGroup(0, threadFactory);
            channelType = NioDatagramChannel.class;
            LOG.debug("Using Netty I/O (non-Epoll) for UDP sockets");
        }
        bootstrap.group(eventLoopGroup);
        bootstrap.channel(channelType);
        bootstrap.handler(lsbh);
        xtrBootstrap.group(eventLoopGroup);
        xtrBootstrap.channel(channelType);
        xtrBootstrap.handler(lxsbh);
        start();
        startXtr();
        clusterSingletonService.registerClusterSingletonService(this);
        LOG.info("LISP (RFC6830) Southbound Plugin is up!");
    }
}
Also used : AuthKeyDb(org.opendaylight.lispflowmapping.mapcache.AuthKeyDb) AuthenticationKeyDataListener(org.opendaylight.lispflowmapping.southbound.lisp.AuthenticationKeyDataListener) DataStoreBackEnd(org.opendaylight.lispflowmapping.dsbackend.DataStoreBackEnd) LispXtrSouthboundHandler(org.opendaylight.lispflowmapping.southbound.lisp.LispXtrSouthboundHandler) EpollEventLoopGroup(io.netty.channel.epoll.EpollEventLoopGroup) LispSouthboundHandler(org.opendaylight.lispflowmapping.southbound.lisp.LispSouthboundHandler) HashMapDb(org.opendaylight.lispflowmapping.inmemorydb.HashMapDb) NioEventLoopGroup(io.netty.channel.nio.NioEventLoopGroup)

Aggregations

EpollEventLoopGroup (io.netty.channel.epoll.EpollEventLoopGroup)1 NioEventLoopGroup (io.netty.channel.nio.NioEventLoopGroup)1 DataStoreBackEnd (org.opendaylight.lispflowmapping.dsbackend.DataStoreBackEnd)1 HashMapDb (org.opendaylight.lispflowmapping.inmemorydb.HashMapDb)1 AuthKeyDb (org.opendaylight.lispflowmapping.mapcache.AuthKeyDb)1 AuthenticationKeyDataListener (org.opendaylight.lispflowmapping.southbound.lisp.AuthenticationKeyDataListener)1 LispSouthboundHandler (org.opendaylight.lispflowmapping.southbound.lisp.LispSouthboundHandler)1 LispXtrSouthboundHandler (org.opendaylight.lispflowmapping.southbound.lisp.LispXtrSouthboundHandler)1