Class UdpConnectionMap

java.lang.Object
org.opendaylight.openflowjava.protocol.impl.core.UdpConnectionMap

public final class UdpConnectionMap extends Object
As UDP communication is handled only by one channel, it is needed to store MessageConsumers, so that we know which consumer handles which channel.
Author:
michal.polkorab
  • Method Details

    • getMessageConsumer

      public static MessageConsumer getMessageConsumer(InetSocketAddress address)
      Gets the MessageConsumer for the given address.
      Parameters:
      address - sender's address
      Returns:
      corresponding MessageConsumer
    • addConnection

      public static void addConnection(InetSocketAddress address, MessageConsumer consumer)
      Adds a connection.
      Parameters:
      address - sender's address
      consumer - MessageConsumer to be added / paired with specified address
    • removeConnection

      public static void removeConnection(InetSocketAddress address)
      Removes a connection.
      Parameters:
      address - sender's address