Package org.somda.sdc.dpws.udp
Class UdpBindingServiceImpl
-
- All Implemented Interfaces:
-
com.google.common.util.concurrent.Service,org.somda.sdc.dpws.udp.UdpBindingService
public class UdpBindingServiceImpl extends AbstractIdleService implements UdpBindingService
Default implementation of UdpBindingService.
-
-
Method Summary
Modifier and Type Method Description voidsetMessageReceiver(UdpMessageReceiverCallback receiver)Sets a message receiver callback to fetch any messages from the UDP socket. voidsendMessage(UdpMessage message)Sends a UDP message given as parameter to the connected UDP socket. StringtoString()-
Methods inherited from class com.google.common.util.concurrent.AbstractIdleService
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
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
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.
-
-
-
-