public interface ServerSelector
Always inject or lookup it by name and not by type, because an application project can define several instances of this type to work with different middleware blocks.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME
Default bean name used by the platform code.
|
Modifier and Type | Method and Description |
---|---|
void |
fail(java.lang.Object context)
Mark the last obtained server URL as failed.
|
java.lang.String |
getUrl(java.lang.Object context)
Get server URL to be used for the current request.
|
java.lang.Object |
initContext()
Initialize a context for the current request.
|
void |
success(java.lang.Object context)
Mark the last obtained server URL as successfully invoked.
|
static final java.lang.String NAME
java.lang.Object initContext()
getUrl(Object)
, success(Object)
and fail(Object)
for the current request@Nullable java.lang.String getUrl(java.lang.Object context)
context
- obtained by the prior invocation of initContext()
void success(java.lang.Object context)
context
- obtained by the prior invocation of initContext()
void fail(java.lang.Object context)
context
- obtained by the prior invocation of initContext()