public interface LoadBalancerLifecycle<RC,RES,T>
| Modifier and Type | Method and Description |
|---|---|
void |
onComplete(CompletionContext<RES,T,RC> completionContext)
A callback method executed after load-balancing.
|
void |
onStart(Request<RC> request)
A callback method executed before load-balancing.
|
void |
onStartRequest(Request<RC> request,
Response<T> lbResponse)
A callback method executed after a service instance has been selected, before
executing the actual load-balanced request.
|
default boolean |
supports(Class requestContextClass,
Class responseClass,
Class serverTypeClass)
Allows to assess whether the lifecycle bean's callbacks should be executed.
|
default boolean supports(Class requestContextClass, Class responseClass, Class serverTypeClass)
requestContextClass - The class of the Request contextresponseClass - The class of the CompletionContext
clientResponseserverTypeClass - The type of Server that the LoadBalancer retrievestrue if the lifecycle should be used to process given classesvoid onStart(Request<RC> request)
request - the Request that will be used by the LoadBalancer to select
a service instancevoid onStartRequest(Request<RC> request, Response<T> lbResponse)
void onComplete(CompletionContext<RES,T,RC> completionContext)
completionContext - the CompletionContext containing data relevant to
the load-balancing and the response returned from the selected service instanceCopyright © 2021 Pivotal Software, Inc.. All rights reserved.