public abstract class AbstractAutoSwitchedMixCascadeContainer extends AbstractMixCascadeContainer
Modifier and Type | Field and Description |
---|---|
static MixCascade |
INITIAL_DUMMY_SERVICE |
Constructor and Description |
---|
AbstractAutoSwitchedMixCascadeContainer(boolean a_bSkipInitialCascade,
MixCascade a_initialCascade,
java.lang.String a_strStartupServiceId) |
Modifier and Type | Method and Description |
---|---|
MixCascade |
getCurrentCascade()
Returns the last return value of getNextCascade().
|
MixCascade |
getInitialCascade() |
MixCascade |
getNextCascade()
Chooses a random Cascade from all available, not already tried ones, until
all have been tried once, or
reset() is called. |
MixCascade |
getNextRandomCascade()
Explicitly chooses the next cascade at random, by calling
reset()
beforehand. |
java.lang.String |
getStartupServiceId() |
ITrustModel |
getTrustModel() |
abstract boolean |
hasUserAllowedPaidServices(java.lang.String a_PIID) |
abstract boolean |
isReconnectedAutomatically()
Returns whether the
MixCascade inside this container reconnects
automatically or not. |
abstract boolean |
isServiceAutoSwitched() |
void |
keepCurrentService(boolean a_bKeepCurrentCascade)
Optional method that should allow to return the last MixCascade (Service) that was returned
by getNextService() also the next time this method is called.
|
void |
reset()
Clears the list of recently tried cascades, allowing them to be selectable
by
getNextCascade() again. |
boolean |
setCurrentCascade(MixCascade a_cascade) |
getCurrentService
public static final MixCascade INITIAL_DUMMY_SERVICE
public AbstractAutoSwitchedMixCascadeContainer(boolean a_bSkipInitialCascade, MixCascade a_initialCascade, java.lang.String a_strStartupServiceId)
public final MixCascade getInitialCascade()
public void reset()
getNextCascade()
again.reset
in interface IServiceContainer
reset
in class AbstractMixCascadeContainer
public final MixCascade getNextRandomCascade()
reset()
beforehand. If auto-reconnect is active, this method is equal to
getNextCascade()
.getNextRandomCascade
in class AbstractMixCascadeContainer
MixCascade
from all available.public final MixCascade getNextCascade()
reset()
is called.getNextCascade
in class AbstractMixCascadeContainer
public abstract boolean isServiceAutoSwitched()
isServiceAutoSwitched
in interface IServiceContainer
isServiceAutoSwitched
in class AbstractMixCascadeContainer
public abstract boolean isReconnectedAutomatically()
AbstractMixCascadeContainer
MixCascade
inside this container reconnects
automatically or not.isReconnectedAutomatically
in interface IServiceContainer
isReconnectedAutomatically
in class AbstractMixCascadeContainer
public abstract boolean hasUserAllowedPaidServices(java.lang.String a_PIID)
public final java.lang.String getStartupServiceId()
public final MixCascade getCurrentCascade()
AbstractMixCascadeContainer
getCurrentCascade
in class AbstractMixCascadeContainer
public final boolean setCurrentCascade(MixCascade a_cascade)
public final void keepCurrentService(boolean a_bKeepCurrentCascade)
AbstractMixCascadeContainer
keepCurrentService
in interface IServiceContainer
keepCurrentService
in class AbstractMixCascadeContainer
a_bKeepCurrentCascade
- allows or disallows to keep the current cascade for the next callpublic final ITrustModel getTrustModel()
getTrustModel
in interface IServiceContainer
getTrustModel
in class AbstractMixCascadeContainer
Copyright © 2023. All rights reserved.