Package org.xbill.DNS

Class NioUdpClient

java.lang.Object
org.xbill.DNS.NioClient
org.xbill.DNS.NioUdpClient
All Implemented Interfaces:
UdpIoClient

final class NioUdpClient extends NioClient implements UdpIoClient
  • Field Details

  • Constructor Details

    • NioUdpClient

      NioUdpClient()
  • Method Details

    • processPendingRegistrations

      private void processPendingRegistrations(Selector selector)
    • checkTransactionTimeouts

      private void checkTransactionTimeouts()
    • sendAndReceiveUdp

      public CompletableFuture<byte[]> sendAndReceiveUdp(InetSocketAddress local, InetSocketAddress remote, Message query, byte[] data, int max, Duration timeout)
      Description copied from interface: UdpIoClient
      Sends a query to a remote server and returns the answer.
      Specified by:
      sendAndReceiveUdp in interface UdpIoClient
      Parameters:
      local - Address from which the connection is coming. may be null and the implementation must decide on the local address.
      remote - Address that the connection should send the data to.
      query - DNS message representation of the outbound query.
      data - Raw byte representation of the outbound query.
      max - Size of the response buffer.
      timeout - Duration before the connection will time out and be closed.
      Returns:
      A CompletableFuture that will be completed with the byte value of the response.
    • silentCloseChannel

      private static void silentCloseChannel(DatagramChannel channel)
    • closeUdp

      private void closeUdp()