Package org.jbpm.services.api.service
Class ServiceRegistry
- java.lang.Object
-
- org.jbpm.services.api.service.ServiceRegistry
-
public class ServiceRegistry extends Object
Single ServiceRegistry that allows any service to register itself so other components can easily look them up.
-
-
Field Summary
Fields Modifier and Type Field Description static StringCASE_RUNTIME_DATA_SERVICEstatic StringCASE_SERVICEstatic StringDEFINITION_SERVICEstatic StringDEPLOYMENT_SERVICEstatic StringEXECUTOR_SERVICEstatic StringMIGRATION_SERVICEstatic StringPROCESS_ADMIN_SERVICEstatic StringPROCESS_SERVICEstatic StringQUERY_SERVICEstatic StringRUNTIME_DATA_SERVICEprotected ConcurrentHashMap<String,Object>servicesstatic StringUSER_TASK_ADMIN_SERVICEstatic StringUSER_TASK_SERVICE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Removes all services from the registrystatic ServiceRegistryget()Returns single instance of the registry used to register and retrieve services.voidregister(String name, Object service)Registers service under given name.voidremove(String name)Removes service registered under given nameObjectservice(String name)Retrieves service registered under given name
-
-
-
Field Detail
-
services
protected volatile ConcurrentHashMap<String,Object> services
-
DEFINITION_SERVICE
public static final String DEFINITION_SERVICE
-
DEPLOYMENT_SERVICE
public static final String DEPLOYMENT_SERVICE
-
PROCESS_SERVICE
public static final String PROCESS_SERVICE
-
RUNTIME_DATA_SERVICE
public static final String RUNTIME_DATA_SERVICE
-
USER_TASK_SERVICE
public static final String USER_TASK_SERVICE
-
QUERY_SERVICE
public static final String QUERY_SERVICE
-
PROCESS_ADMIN_SERVICE
public static final String PROCESS_ADMIN_SERVICE
-
MIGRATION_SERVICE
public static final String MIGRATION_SERVICE
-
USER_TASK_ADMIN_SERVICE
public static final String USER_TASK_ADMIN_SERVICE
-
EXECUTOR_SERVICE
public static final String EXECUTOR_SERVICE
-
CASE_SERVICE
public static final String CASE_SERVICE
- See Also:
- Constant Field Values
-
CASE_RUNTIME_DATA_SERVICE
public static final String CASE_RUNTIME_DATA_SERVICE
- See Also:
- Constant Field Values
-
-
Method Detail
-
get
public static ServiceRegistry get()
Returns single instance of the registry used to register and retrieve services.- Returns:
- instance of the registry
-
register
public void register(String name, Object service)
Registers service under given name.- Parameters:
name- name of the serviceservice- actual service instance
-
remove
public void remove(String name)
Removes service registered under given name- Parameters:
name- name of the service
-
service
public Object service(String name)
Retrieves service registered under given name- Parameters:
name- name of the service- Returns:
- instance of the service registered with given name
- Throws:
IllegalArgumentException- thrown in case service with given name is not registered
-
clear
public void clear()
Removes all services from the registry
-
-