예제 #1
0
파일: Delay.java 프로젝트: paulorcf/fuseide
 @SuppressWarnings("rawtypes")
 @Override
 public ProcessorDefinition createCamelDefinition() {
   DelayDefinition answer = new DelayDefinition();
   answer.setExpression(toXmlPropertyValue(PROPERTY_EXPRESSION, this.getExpression()));
   answer.setExecutorServiceRef(
       toXmlPropertyValue(PROPERTY_EXECUTORSERVICEREF, this.getExecutorServiceRef()));
   answer.setAsyncDelayed(toXmlPropertyValue(PROPERTY_ASYNCDELAYED, this.getAsyncDelayed()));
   answer.setCallerRunsWhenRejected(
       toXmlPropertyValue(PROPERTY_CALLERRUNSWHENREJECTED, this.getCallerRunsWhenRejected()));
   super.savePropertiesToCamelDefinition(answer);
   return answer;
 }
예제 #2
0
파일: Delay.java 프로젝트: paulorcf/fuseide
  @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());
    }
  }