Package org.apache.calcite.avatica.remote

# Interface Handler<T>

Type Parameters:
  `T` - The type this handler accepts and returns

All Known Implementing Classes:
  `AbstractHandler`, `JsonHandler`, `ProtobufHandler`

public interface Handler<T>
API for text request-response calls to an Avatica server.

## Nested Class Summary

Nested Classes
Modifier and Type
Interface
Description
`static class`
`Handler.HandlerResponse<T>`
Struct that encapsulates the context of the result of a request to Avatica.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`HANDLER_SERIALIZATION_METRICS_NAME`
`static final int`
`HTTP_INTERNAL_SERVER_ERROR`
`static final int`
`HTTP_OK`
`static final int`
`HTTP_UNAUTHENTICATED`
`static final int`
`HTTP_UNAUTHORIZED`

## Method Summary

Modifier and Type
Method
Description
`Handler.HandlerResponse<T>`
`apply(T request)`
`void`
`setRpcMetadata(Service.RpcMetadataResponse metadata)`
Sets some general server information to return to the client in all responses.

## Field Details

### HTTP_OK

static final int HTTP_OK

See Also:
  - Constant Field Values

### HTTP_UNAUTHENTICATED

static final int HTTP_UNAUTHENTICATED

See Also:
  - Constant Field Values

### HTTP_UNAUTHORIZED

static final int HTTP_UNAUTHORIZED

See Also:
  - Constant Field Values

### HTTP_INTERNAL_SERVER_ERROR

static final int HTTP_INTERNAL_SERVER_ERROR

See Also:
  - Constant Field Values

### HANDLER_SERIALIZATION_METRICS_NAME

static final String HANDLER_SERIALIZATION_METRICS_NAME

See Also:
  - Constant Field Values

## Method Details

### apply

Handler.HandlerResponse<T> apply(T request)

### setRpcMetadata

void setRpcMetadata(Service.RpcMetadataResponse metadata)
Sets some general server information to return to the client in all responses.

Parameters:
  `metadata` - Server-wide information