Package org.distributeme.core.failing
Class Failover
java.lang.Object
org.distributeme.core.routing.AbstractRouter
org.distributeme.core.failing.Failover
- All Implemented Interfaces:
FailingStrategy,RegistrationNameProvider,Router
public class Failover
extends AbstractRouter
implements FailingStrategy, RegistrationNameProvider, Router
This failing strategy / router combination fails over to a special failover service instance and stays there.
- Version:
- $Id: $Id
- Author:
- another
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncallFailed(ClientSideCallContext context) What should happen if a call is failed.voidThis is old style customize.getRegistrationName(String serviceId) Returns the registration name for this service instance.getServiceIdForCall(ClientSideCallContext callContext) Returns the serviceId for this particular call to route to.Methods inherited from class org.distributeme.core.routing.AbstractRouter
customize, getRoutingStats, setServiceId
-
Field Details
-
SUFFIX
Suffix of the failover instance.- See Also:
-
-
Constructor Details
-
Failover
public Failover()
-
-
Method Details
-
getServiceIdForCall
Returns the serviceId for this particular call to route to.- Specified by:
getServiceIdForCallin interfaceRouter- Parameters:
callContext- context of the call with all call related data.- Returns:
- a
Stringobject.
-
getRegistrationName
Returns the registration name for this service instance.- Specified by:
getRegistrationNamein interfaceRegistrationNameProvider- Parameters:
serviceId- aStringobject.- Returns:
- a
Stringobject.
-
customize
This is old style customize. It is called by the 'new' customize.- Specified by:
customizein interfaceRegistrationNameProvider- Overrides:
customizein classAbstractRouter- Parameters:
parameter- aStringobject.
-
callFailed
What should happen if a call is failed.- Specified by:
callFailedin interfaceFailingStrategy- Parameters:
context- aClientSideCallContextobject.- Returns:
- a
FailDecisionobject.
-