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)
FlightServerMiddleware
onBeforeSendingHeaders
in interface FlightServerMiddleware
outgoingHeaders
- A mutable set of response headers. These can be manipulated to send different headers to the
client.public void onCallCompleted(CallStatus status)
FlightServerMiddleware
onCallCompleted
in interface FlightServerMiddleware
status
- Whether the call completed successfully or not.public void onCallErrored(Throwable err)
FlightServerMiddleware
May 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 FlightServerMiddleware
err
- The exception that was thrown.Copyright © 2024 The Apache Software Foundation. All rights reserved.