public abstract class BlockingGateKeeper extends GateKeeper
Once an app tracked flows are enabled they remain so even if a future policy application fails.
GateKeeper logic:
at gateway startup - remove local online policies from filesystem
at app deploy - stop app tracked flows on deploy
at API policies request time - cache response if successful
at policy store update (from polling or HC notification) - update required policies for particular API - check if any blocked API can be enabled
at policy application/removal - if successfully applied or removed update applied policy list - assert blocked APIs required policies and start those with nothing pending
| Modifier and Type | Class and Description |
|---|---|
static class |
BlockingGateKeeper.GateKeeperMuleContextListener
MuleContext listener used to block an API implementation before it starts its listener.
|
apiService| Constructor and Description |
|---|
BlockingGateKeeper(ApiService apiService,
PolicyFactory policyFactory) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
blockApi(Api api) |
protected void |
doBlockApi(Api api) |
protected boolean |
isMonitored(Api api) |
void |
onPoliciesRemoved(com.mulesoft.mule.runtime.gw.api.key.ApiKey apiKey)
Block API because it is being undeployed or because it is now untracked
|
protected void |
unblockApi(Api api) |
everyPolicySuccessfullyApplied, getBlockedMonitoredApi, getMonitoredApi, onApiDeploymentStart, onContractsLoaded, onContractsRequired, onNoContractsRequired, onPolicySetDeploymentCompleted, validOriginclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonApiDeploymentSuccess, onApiRedeploymentStart, onApiUndeploymentStartpublic BlockingGateKeeper(ApiService apiService, PolicyFactory policyFactory)
public void onPoliciesRemoved(com.mulesoft.mule.runtime.gw.api.key.ApiKey apiKey)
apiKey - key of the APIprotected boolean isMonitored(Api api)
isMonitored in class GateKeeperprotected void blockApi(Api api)
blockApi in class GateKeeperprotected void doBlockApi(Api api)
protected void unblockApi(Api api)
unblockApi in class GateKeeperCopyright © 2014–2022 MuleSoft, Inc.. All rights reserved.