public class ServerHeaderMiddleware extends Object implements FlightServerMiddleware
| Modifier and Type | Class and Description |
|---|---|
static class |
ServerHeaderMiddleware.Factory
Factory for accessing ServerHeaderMiddleware.
|
FlightServerMiddleware.Key<T extends FlightServerMiddleware>| Modifier and Type | Method and Description |
|---|---|
CallHeaders |
headers()
Retrieve the headers for this call.
|
void |
onBeforeSendingHeaders(CallHeaders outgoingHeaders)
Callback for when the underlying transport is about to send response headers.
|
void |
onCallCompleted(CallStatus status)
Callback for when the underlying transport has completed a call.
|
void |
onCallErrored(Throwable err)
Callback for when an RPC method implementation throws an uncaught exception.
|
public CallHeaders headers()
public void onBeforeSendingHeaders(CallHeaders outgoingHeaders)
FlightServerMiddlewareonBeforeSendingHeaders in interface FlightServerMiddlewareoutgoingHeaders - A mutable set of response headers. These can be manipulated to send different headers to the
client.public void onCallCompleted(CallStatus status)
FlightServerMiddlewareonCallCompleted in interface FlightServerMiddlewarestatus - Whether the call completed successfully or not.public void onCallErrored(Throwable err)
FlightServerMiddlewareMay be called multiple times, and may be called before or after FlightServerMiddleware.onCallCompleted(CallStatus).
Generally, an uncaught exception will end the call with a error CallStatus, and will be reported to FlightServerMiddleware.onCallCompleted(CallStatus), but not necessarily this method.
onCallErrored in interface FlightServerMiddlewareerr - The exception that was thrown.Copyright © 2024 The Apache Software Foundation. All rights reserved.