/** * This is a factory method for this WorkItemHandler configuration. * The factory method is a best practice for the case where the * actual object construction is changed in the future. * * @param name the name of the work item handler to be configured * * @return the actual type safe work item handler configuration. */ public static WorkItemHandlerOption get( final String name, final WorkItemHandler handler ) { return new WorkItemHandlerOption( name, handler ); }
public static MultiValueKnowledgeSessionOption adaptOption(MultiValueKieSessionOption option) { if (option instanceof WorkItemHandlerOption) { WorkItemHandlerOption kieOption = (WorkItemHandlerOption)option; return org.drools.runtime.conf.WorkItemHandlerOption.get(kieOption.getName(), new WorkItemHandlerKieAdapter(kieOption.getHandler())); } throw new UnsupportedOperationException("Unknown option " + option); }
return WorkItemHandlerOption.get(legacyOption.getName(), new WorkItemHandlerAdapter(legacyOption.getHandler()));
/** * This is a factory method for this WorkItemHandler configuration. * The factory method is a best practice for the case where the * actual object construction is changed in the future. * * @param name the name of the work item handler to be configured * * @return the actual type safe work item handler configuration. */ public static WorkItemHandlerOption get( final String name, final WorkItemHandler handler ) { return new WorkItemHandlerOption( name, handler ); }