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,
TransactionalPolicyDeploymentService policyDeployer,
boolean blockFailedRevert) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
blockApi(Api api) |
protected void |
checkRevertFailed(com.mulesoft.mule.runtime.gw.api.key.ApiKey apiKey,
List<PolicyDefinitionDeploymentStatus> deploymentStatuses) |
protected void |
doBlockApi(Api api) |
protected boolean |
hasFailedReverts(List<PolicyDefinitionDeploymentStatus> deploymentStatuses) |
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
|
void |
onPolicySetDeploymentCompleted(com.mulesoft.mule.runtime.gw.api.key.ApiKey apiKey,
PolicySet policySet,
List<PolicyDefinitionDeploymentStatus> deploymentStatuses)
Check whether the API can be unblocked after a fresh
PolicySet has been applied to it |
protected void |
unblockApi(Api api) |
everyPolicySuccessfullyApplied, getBlockedMonitoredApi, getMonitoredApi, onApiDeploymentStart, onContractsLoaded, onContractsRequired, onNoContractsRequired, validOriginclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonApiDeploymentSuccess, onApiRedeploymentStart, onApiUndeploymentStartpublic BlockingGateKeeper(ApiService apiService, TransactionalPolicyDeploymentService policyDeployer, boolean blockFailedRevert)
public void onPoliciesRemoved(com.mulesoft.mule.runtime.gw.api.key.ApiKey apiKey)
apiKey - key of the APIprotected boolean isMonitored(Api api)
isMonitored in class GateKeeperpublic void onPolicySetDeploymentCompleted(com.mulesoft.mule.runtime.gw.api.key.ApiKey apiKey, PolicySet policySet, List<PolicyDefinitionDeploymentStatus> deploymentStatuses)
GateKeeperPolicySet has been applied to itonPolicySetDeploymentCompleted in interface PolicySetDeploymentListeneronPolicySetDeploymentCompleted in class GateKeeperapiKey - key of the APIpolicySet - set of policies that were deployeddeploymentStatuses - statuses of policies that were deployedprotected void checkRevertFailed(com.mulesoft.mule.runtime.gw.api.key.ApiKey apiKey, List<PolicyDefinitionDeploymentStatus> deploymentStatuses)
protected boolean hasFailedReverts(List<PolicyDefinitionDeploymentStatus> deploymentStatuses)
protected void blockApi(Api api)
blockApi in class GateKeeperprotected void doBlockApi(Api api)
protected void unblockApi(Api api)
unblockApi in class GateKeeperCopyright © 2014–2025 MuleSoft, Inc.. All rights reserved.