java.lang.Object
org.opendaylight.openflowjava.protocol.impl.core.UdpHandler
All Implemented Interfaces:
Runnable, OnlineProvider, ServerFacade, ShutdownProvider

public final class UdpHandler extends Object implements ServerFacade
Class implementing server over UDP for handling incoming connections.
Author:
michal.polkorab
  • Constructor Details

    • UdpHandler

      public UdpHandler(int port, Runnable readyRunnable)
      Constructor of UdpHandler that listens on selected port.
      Parameters:
      port - listening port of UdpHandler server
    • UdpHandler

      public UdpHandler(InetAddress address, int port, Runnable readyRunnable)
      Constructor of UdpHandler that listens on selected address and port.
      Parameters:
      address - listening address of UdpHandler server
      port - listening port of UdpHandler server
  • Method Details

    • run

      public void run()
      Specified by:
      run in interface Runnable
    • shutdown

      public com.google.common.util.concurrent.ListenableFuture<Boolean> shutdown()
      Specified by:
      shutdown in interface ShutdownProvider
    • getIsOnlineFuture

      public com.google.common.util.concurrent.ListenableFuture<Boolean> getIsOnlineFuture()
      Specified by:
      getIsOnlineFuture in interface OnlineProvider
    • getPort

      public int getPort()
    • setChannelInitializer

      public void setChannelInitializer(UdpChannelInitializer channelInitializer)
    • setThreadConfig

      public void setThreadConfig(ThreadConfiguration threadConfig)
      Description copied from interface: ServerFacade
      Sets thread configuration.
      Specified by:
      setThreadConfig in interface ServerFacade
      Parameters:
      threadConfig - desired thread configuration
    • initiateEventLoopGroups

      public void initiateEventLoopGroups(ThreadConfiguration threadConfiguration, boolean isEpollEnabled)
      Initiate event loop groups.
      Parameters:
      threadConfiguration - number of threads to be created, if not specified in threadConfig
    • initiateNioEventLoopGroups

      public void initiateNioEventLoopGroups(ThreadConfiguration threadConfiguration)
      Initiate Nio event loop groups.
      Parameters:
      threadConfiguration - number of threads to be created, if not specified in threadConfig
    • initiateEpollEventLoopGroups

      protected void initiateEpollEventLoopGroups(ThreadConfiguration threadConfiguration)
      Initiate Epoll event loop groups with Nio as fall back.
      Parameters:
      threadConfiguration - the ThreadConfiguration