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;
}
Aggregations