public abstract class FailoverAndReturn extends Object implements FailingStrategy, RegistrationNameProvider, Router
Modifier and Type | Field and Description |
---|---|
protected static long |
MINUTE
Minutes in ms.
|
protected static long |
SECOND
Seconds in ms.
|
static String |
SUFFIX
Suffix of the failover instance.
|
Constructor and Description |
---|
FailoverAndReturn() |
Modifier and Type | Method and Description |
---|---|
FailDecision |
callFailed(ClientSideCallContext context)
What should happen if a call is failed.
|
void |
customize(String parameter)
Called shortly after the initialization to customize this registration name provider according to the parameter in the annotation.
|
protected abstract long |
getFailbackTimeout()
Returns the time unit in milliseconds between the router retries to get back to original server.
|
String |
getRegistrationName(String serviceId)
Returns the registration name for this service instance.
|
String |
getServiceIdForCall(ClientSideCallContext callContext)
Returns the serviceId for this particular call to route to.
|
protected String |
getSuffix() |
protected static final long SECOND
protected static final long MINUTE
public static final String SUFFIX
protected abstract long getFailbackTimeout()
public String getServiceIdForCall(ClientSideCallContext callContext)
Router
getServiceIdForCall
in interface Router
callContext
- context of the call with all call related data.public String getRegistrationName(String serviceId)
RegistrationNameProvider
getRegistrationName
in interface RegistrationNameProvider
public void customize(String parameter)
RegistrationNameProvider
customize
in interface RegistrationNameProvider
customize
in interface Router
public FailDecision callFailed(ClientSideCallContext context)
FailingStrategy
callFailed
in interface FailingStrategy
protected String getSuffix()
Copyright © 2010-2014 anotheria.net. All Rights Reserved.