public class ServerSessionMiddleware extends Object implements FlightServerMiddleware
| Modifier and Type | Class and Description |
|---|---|
static class |
ServerSessionMiddleware.Factory
Factory for managing and accessing ServerSessionMiddleware.
|
static class |
ServerSessionMiddleware.Session
A thread-safe container for named SessionOptionValues.
|
FlightServerMiddleware.Key<T extends FlightServerMiddleware>| Modifier and Type | Field and Description |
|---|---|
static String |
sessionCookieName |
| Modifier and Type | Method and Description |
|---|---|
void |
closeSession()
Close the current session.
|
CallHeaders |
getCallHeaders() |
ServerSessionMiddleware.Session |
getSession()
Get the existing or new session value map for this call.
|
boolean |
hasSession()
Check if there is an open session associated with 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 static final String sessionCookieName
public boolean hasSession()
public ServerSessionMiddleware.Session getSession()
public void closeSession()
public CallHeaders getCallHeaders()
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.