Interface UdpBindingService

  • All Implemented Interfaces:
    com.google.common.util.concurrent.Service

    
    public interface UdpBindingService
     implements Service
                        

    Service to receive and send UDP messages.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract void setMessageReceiver(UdpMessageReceiverCallback receiver) Sets a message receiver callback to fetch any messages from the UDP socket.
      abstract void sendMessage(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
    • Constructor Detail

    • 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.