Beispiel #1
0
  @SuppressWarnings("rawtypes")
  @Override
  protected void loadPropertiesFromCamelDefinition(ProcessorDefinition processor) {
    super.loadPropertiesFromCamelDefinition(processor);

    if (processor instanceof PolicyDefinition) {
      PolicyDefinition node = (PolicyDefinition) processor;
      this.setRef(node.getRef());
    } else {
      throw new IllegalArgumentException(
          "ProcessorDefinition not an instanceof PolicyDefinition. Was "
              + processor.getClass().getName());
    }
  }
Beispiel #2
0
  @SuppressWarnings("rawtypes")
  @Override
  protected void loadPropertiesFromCamelDefinition(ProcessorDefinition processor) {
    super.loadPropertiesFromCamelDefinition(processor);

    if (processor instanceof DelayDefinition) {
      DelayDefinition node = (DelayDefinition) processor;
      this.setExpression(node.getExpression());
      this.setExecutorServiceRef(node.getExecutorServiceRef());
      this.setAsyncDelayed(node.getAsyncDelayed());
      this.setCallerRunsWhenRejected(node.getCallerRunsWhenRejected());
    } else {
      throw new IllegalArgumentException(
          "ProcessorDefinition not an instanceof DelayDefinition. Was "
              + processor.getClass().getName());
    }
  }
Beispiel #3
0
  @SuppressWarnings("rawtypes")
  @Override
  protected void loadPropertiesFromCamelDefinition(ProcessorDefinition processor) {
    super.loadPropertiesFromCamelDefinition(processor);

    if (processor instanceof LoadBalanceDefinition) {
      LoadBalanceDefinition node = (LoadBalanceDefinition) processor;

      this.setInheritErrorHandler(Objects.<Boolean>getField(node, "inheritErrorHandler"));
      this.setRef(node.getRef());
      this.setLoadBalancerType(node.getLoadBalancerType());
    } else {
      throw new IllegalArgumentException(
          "ProcessorDefinition not an instanceof LoadBalanceDefinition. Was "
              + processor.getClass().getName());
    }
  }