Package org.somda.sdc.dpws.udp
Interface UdpBindingService
-
- All Implemented Interfaces:
-
com.google.common.util.concurrent.Service
public interface UdpBindingService implements ServiceService to receive and send UDP messages.
-
-
Method Summary
Modifier and Type Method Description abstract voidsetMessageReceiver(UdpMessageReceiverCallback receiver)Sets a message receiver callback to fetch any messages from the UDP socket. abstract voidsendMessage(UdpMessage message)Sends a UDP message given as parameter to the connected UDP socket. -
Methods inherited from class com.google.common.util.concurrent.Service
addListener, awaitRunning, awaitTerminated, failureCause, isRunning, startAsync, state, stopAsync -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
setMessageReceiver
abstract void setMessageReceiver(UdpMessageReceiverCallback receiver)
Sets a message receiver callback to fetch any messages from the UDP socket.
A received message contains the payload as well as sender address and port.
- Parameters:
receiver- the message receiver to set.
-
sendMessage
abstract void sendMessage(UdpMessage message)
Sends a UDP message given as parameter to the connected UDP socket.
The function blocks until the message is sent.
- Parameters:
message- the message to send.
-
-
-
-