Search in sources :

Example 1 with RetryNotifier

use of org.mule.runtime.core.api.retry.RetryNotifier in project mule by mulesoft.

the class CoreComponentBuildingDefinitionProvider method getReconnectionDefinitions.

private List<ComponentBuildingDefinition> getReconnectionDefinitions() {
    List<ComponentBuildingDefinition> buildingDefinitions = new ArrayList<>();
    ComponentBuildingDefinition.Builder baseReconnectDefinition = baseDefinition.withTypeDefinition(fromType(RetryPolicyTemplate.class)).withObjectFactoryType(RetryPolicyTemplateObjectFactory.class).withSetterParameterDefinition("blocking", fromSimpleParameter("blocking").build()).withSetterParameterDefinition("frequency", fromSimpleParameter("frequency").build());
    buildingDefinitions.add(baseReconnectDefinition.withIdentifier(RECONNECT_FOREVER_ELEMENT_IDENTIFIER).withSetterParameterDefinition("count", fromFixedValue(RETRY_COUNT_FOREVER).build()).build());
    buildingDefinitions.add(baseReconnectDefinition.withIdentifier(RECONNECT_ELEMENT_IDENTIFIER).withSetterParameterDefinition("retryNotifier", fromChildConfiguration(RetryNotifier.class).build()).withSetterParameterDefinition("count", fromSimpleParameter("count").build()).build());
    buildingDefinitions.add(baseDefinition.withIdentifier(RECONNECTION_ELEMENT_IDENTIFIER).withTypeDefinition(fromType(ReconnectionConfig.class)).withObjectFactoryType(ReconnectionConfigObjectFactory.class).withSetterParameterDefinition("failsDeployment", fromSimpleParameter("failsDeployment").build()).withSetterParameterDefinition("retryPolicyTemplate", fromChildConfiguration(RetryPolicyTemplate.class).build()).build());
    return buildingDefinitions;
}
Also used : Builder(org.mule.runtime.dsl.api.component.ComponentBuildingDefinition.Builder) ArrayList(java.util.ArrayList) RetryNotifier(org.mule.runtime.core.api.retry.RetryNotifier) ComponentBuildingDefinition(org.mule.runtime.dsl.api.component.ComponentBuildingDefinition)

Aggregations

ArrayList (java.util.ArrayList)1 RetryNotifier (org.mule.runtime.core.api.retry.RetryNotifier)1 ComponentBuildingDefinition (org.mule.runtime.dsl.api.component.ComponentBuildingDefinition)1 Builder (org.mule.runtime.dsl.api.component.ComponentBuildingDefinition.Builder)1