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 Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
addConnection(InetSocketAddress address, MessageConsumer consumer)
Adds a connection.static MessageConsumer
getMessageConsumer(InetSocketAddress address)
Gets the MessageConsumer for the given address.static void
removeConnection(InetSocketAddress address)
Removes a connection.
-
-
-
Method Detail
-
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 addressconsumer
- MessageConsumer to be added / paired with specified address
-
removeConnection
public static void removeConnection(InetSocketAddress address)
Removes a connection.- Parameters:
address
- sender's address
-
-