org.apache.avro.ipc.specific

## Class SpecificRequestor

- java.lang.Object
- - org.apache.avro.ipc.Requestor
  - - org.apache.avro.ipc.specific.SpecificRequestor

- All Implemented Interfaces:
    InvocationHandler
  Direct Known Subclasses:
    ReflectRequestor

      public class SpecificRequestor
      extends Requestor
      implements InvocationHandler

  `Requestor` for generated interfaces.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.avro.ipc.Requestor

      `Requestor.TransceiverCallback<T>`

  - ### Field Summary

    - ### Fields inherited from class org.apache.avro.ipc.Requestor

      `rpcMetaPlugins`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `` | `SpecificRequestor(Class<?> iface, Transceiver transceiver)`
    `` | `SpecificRequestor(Class<?> iface, Transceiver transceiver, SpecificData data)`
    `protected` | `SpecificRequestor(Protocol protocol, Transceiver transceiver)`
    `` | `SpecificRequestor(Protocol protocol, Transceiver transceiver, SpecificData data)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T> T` | `getClient(Class<T> iface, SpecificRequestor requestor)` Create a proxy instance whose methods invoke RPCs.
    `static <T> T` | `getClient(Class<T> iface, Transceiver transceiver)` Create a proxy instance whose methods invoke RPCs.
    `static <T> T` | `getClient(Class<T> iface, Transceiver transceiver, SpecificData data)` Create a proxy instance whose methods invoke RPCs.
    `protected DatumReader<Object>` | `getDatumReader(Schema schema)` Deprecated.
    `protected DatumReader<Object>` | `getDatumReader(Schema writer, Schema reader)`
    `protected DatumWriter<Object>` | `getDatumWriter(Schema schema)`
    `static Protocol` | `getRemote(Object proxy)` Return the remote protocol for a proxy.
    `SpecificData` | `getSpecificData()`
    `Object` | `invoke(Object proxy, Method method, Object[] args)`
    `Exception` | `readError(Schema writer, Schema reader, Decoder in)` Reads an error message.
    `Object` | `readResponse(Schema writer, Schema reader, Decoder in)` Reads a response message.
    `void` | `writeRequest(Schema schema, Object request, Encoder out)` Writes a request message.

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

      `addRPCPlugin, getLocal, getRemote, getTransceiver, readError, readResponse, request, request`

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

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

- - ### Constructor Detail

    - #### SpecificRequestor

          public SpecificRequestor(Class<?> iface,
                                   Transceiver transceiver)
                            throws IOException

      Throws:
        `IOException`

    - #### SpecificRequestor

          protected SpecificRequestor(Protocol protocol,
                                      Transceiver transceiver)
                               throws IOException

      Throws:
        `IOException`

    - #### SpecificRequestor

          public SpecificRequestor(Class<?> iface,
                                   Transceiver transceiver,
                                   SpecificData data)
                            throws IOException

      Throws:
        `IOException`

    - #### SpecificRequestor

          public SpecificRequestor(Protocol protocol,
                                   Transceiver transceiver,
                                   SpecificData data)
                            throws IOException

      Throws:
        `IOException`

  - ### Method Detail

    - #### getSpecificData

          public SpecificData getSpecificData()

    - #### invoke

          public Object invoke(Object proxy,
                               Method method,
                               Object[] args)
                        throws Throwable

      Specified by:
        `invoke` in interface `InvocationHandler`
      Throws:
        `Throwable`

    - #### getDatumWriter

          protected DatumWriter<Object> getDatumWriter(Schema schema)

    - #### getDatumReader

          @Deprecated
          protected DatumReader<Object> getDatumReader(Schema schema)

      Deprecated.

    - #### getDatumReader

          protected DatumReader<Object> getDatumReader(Schema writer,
                                                       Schema reader)

    - #### writeRequest

          public void writeRequest(Schema schema,
                                   Object request,
                                   Encoder out)
                            throws IOException

      Description copied from class: `Requestor`
      Writes a request message.
      Specified by:
        `writeRequest` in class `Requestor`
      Throws:
        `IOException`

    - #### readResponse

          public Object readResponse(Schema writer,
                                     Schema reader,
                                     Decoder in)
                              throws IOException

      Description copied from class: `Requestor`
      Reads a response message.
      Specified by:
        `readResponse` in class `Requestor`
      Throws:
        `IOException`

    - #### readError

          public Exception readError(Schema writer,
                                     Schema reader,
                                     Decoder in)
                              throws IOException

      Description copied from class: `Requestor`
      Reads an error message.
      Specified by:
        `readError` in class `Requestor`
      Throws:
        `IOException`

    - #### getClient

          public static <T> T getClient(Class<T> iface,
                                        Transceiver transceiver)
                                 throws IOException

      Create a proxy instance whose methods invoke RPCs.
      Throws:
        `IOException`

    - #### getClient

          public static <T> T getClient(Class<T> iface,
                                        Transceiver transceiver,
                                        SpecificData data)
                                 throws IOException

      Create a proxy instance whose methods invoke RPCs.
      Throws:
        `IOException`

    - #### getClient

          public static <T> T getClient(Class<T> iface,
                                        SpecificRequestor requestor)
                                 throws IOException

      Create a proxy instance whose methods invoke RPCs.
      Throws:
        `IOException`

    - #### getRemote

          public static Protocol getRemote(Object proxy)
                                    throws IOException

      Return the remote protocol for a proxy.
      Throws:
        `IOException`

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