--- /dev/null
+/*\r
+ * Copyright (c) 2014 Pantheon Technologies s.r.o. and others. All rights reserved.\r
+ *\r
+ * This program and the accompanying materials are made available under the\r
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
+ * and is available at http://www.eclipse.org/legal/epl-v10.html\r
+ */\r
+\r
+package org.opendaylight.openflowjava.protocol.impl.core.connection;\r
+\r
+import io.netty.util.concurrent.Future;\r
+import io.netty.util.concurrent.GenericFutureListener;\r
+\r
+import java.net.InetSocketAddress;\r
+\r
+/**\r
+ * Wraps outgoing message and includes listener attached to this message. This object\r
+ * is sent to OFEncoder. When OFEncoder fails to serialize the message,\r
+ * listener is filled with exception. The exception is then delegated to upper ODL layers.\r
+ * This object is used for UDP communication - it also carries recipient address\r
+ \r
+ * @author michal.polkorab\r
+ */\r
+public class UdpMessageListenerWrapper extends MessageListenerWrapper {\r
+\r
+ private InetSocketAddress address;\r
+\r
+ /**\r
+ * @param msg message to be sent\r
+ * @param listener listener attached to channel.write(msg) Future\r
+ * @param address recipient's address\r
+ */\r
+ public UdpMessageListenerWrapper(Object msg, GenericFutureListener<Future<Void>> listener,\r
+ InetSocketAddress address) {\r
+ super(msg, listener);\r
+ this.address = address;\r
+ }\r
+\r
+ /**\r
+ * @return recipient address\r
+ */\r
+ public InetSocketAddress getAddress() {\r
+ return address;\r
+ }\r
+}
\ No newline at end of file