⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jbpmservicelocator.java

📁 一个java工作流引擎
💻 JAVA
字号:
package org.jbpm;

import org.jbpm.service.*;

/**
 * provides access to the service-objects.
 * This implementation will instantiate the service-objects lazy and cache them.
 * When using the singleton instance, make sure you've configured jbpm as specified in {@link JbpmConfiguration}.
 */
public class JbpmServiceLocator {

 /**
  * retrieves the singleton instance.
  */
  public static JbpmServiceLocator getInstance() {
    if ( instance == null ) {
      instance = new JbpmServiceLocator( JbpmConfiguration.getInstance() );
    }
    return instance;
  }

  /**
   * allows the creation of multiple, differently configured jbpm instances
   * inside one JVM (within one classloader).  
   */
  public JbpmServiceLocator( JbpmConfiguration jbpmConfiguration ) {
    this.jbpmConfiguration = jbpmConfiguration;
  }
  
	/**
   * retrieves the definition service singleton instance.
   */
  public DefinitionService getDefinitionService() {
    if ( definitionService == null ) {
      definitionService = new DefinitionServiceImpl(jbpmConfiguration);
    }
    return definitionService;
  }

  /**
   * retrieves the execution service singleton instance.
   */
  public ExecutionService getExecutionService() {
    if ( executionService == null ) {
      executionService = new ExecutionServiceImpl(jbpmConfiguration);
    }
    return executionService;
  }

  /**
   * retrieves the log service singleton instance.
   */
  public LogService getLogService() {
    if ( logService == null ) {
      logService = new LogServiceImpl(jbpmConfiguration);
    }
    return logService;
  }
  
  private static JbpmServiceLocator instance = null;

  private JbpmConfiguration jbpmConfiguration = null;
  private String transactionType = null;
  private DefinitionService definitionService = null;
  private ExecutionService executionService = null;
  private LogService logService = null;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -