org.apache.avro.ipc

## Class DatagramTransceiver

- java.lang.Object
- - org.apache.avro.ipc.Transceiver
  - - org.apache.avro.ipc.DatagramTransceiver

- All Implemented Interfaces:
    Closeable, AutoCloseable

      public class DatagramTransceiver
      extends Transceiver

  A datagram-based `Transceiver` implementation. This uses a simple, non-standard wire protocol and is not intended for production services.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DatagramTransceiver(DatagramChannel channel)`
    `DatagramTransceiver(SocketAddress remote)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getRemoteName()`
    `List<ByteBuffer>` | `readBuffers()` Called by the default definition of `Transceiver.transceive(List)`.
    `void` | `writeBuffers(List<ByteBuffer> buffers)` Called by `Requestor.request(String,Object)` for one-way messages.

    - ### Methods inherited from class org.apache.avro.ipc.Transceiver

      `close, getRemote, isConnected, lockChannel, setRemote, transceive, transceive, unlockChannel`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DatagramTransceiver

          public DatagramTransceiver(SocketAddress remote)
                              throws IOException

      Throws:
        `IOException`

    - #### DatagramTransceiver

          public DatagramTransceiver(DatagramChannel channel)

  - ### Method Detail

    - #### getRemoteName

          public String getRemoteName()

      Specified by:
        `getRemoteName` in class `Transceiver`

    - #### readBuffers

          public List<ByteBuffer> readBuffers()
                                       throws IOException

      Description copied from class: `Transceiver`
      Called by the default definition of `Transceiver.transceive(List)`.
      Specified by:
        `readBuffers` in class `Transceiver`
      Throws:
        `IOException`

    - #### writeBuffers

          public void writeBuffers(List<ByteBuffer> buffers)
                            throws IOException

      Description copied from class: `Transceiver`
      Called by `Requestor.request(String,Object)` for one-way messages.
      Specified by:
        `writeBuffers` in class `Transceiver`
      Throws:
        `IOException`

Copyright © 2009–2024 The Apache Software Foundation. All rights reserved.