|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ServiceManager
Nested Class Summary | |
---|---|
static interface |
ServiceManager.ServiceScheduleSkipper
This interface provides capability for other processes to request a service run. |
Method Summary | |
---|---|
JiraServiceContainer |
addService(java.lang.String name,
java.lang.Class<? extends JiraService> serviceClass,
long delay)
This will add a service configuration to the JIRA DB and the service to the list of services which are running. |
JiraServiceContainer |
addService(java.lang.String name,
java.lang.Class<? extends JiraService> serviceClass,
long delay,
java.util.Map<java.lang.String,java.lang.String[]> params)
This will add a service configuration to the JIRA DB and the service to the list of services which are running with an optional list of params. |
JiraServiceContainer |
addService(java.lang.String name,
java.lang.String className,
long delay)
This will add a service configuration to the JIRA DB and the service to the list of services which are running. |
JiraServiceContainer |
addService(java.lang.String name,
java.lang.String className,
long delay,
java.util.Map<java.lang.String,java.lang.String[]> params)
This will add a service configuration to the JIRA DB and the service to the list of services which are running with an optional list of params. |
boolean |
containsServiceWithId(java.lang.Long id)
Quick way of telling whether a service with a specific id is registered or not. |
void |
editService(java.lang.Long id,
long delay,
java.util.Map<java.lang.String,java.lang.String[]> params)
This will update the service if a service with this id can be found. |
void |
editServiceByName(java.lang.String name,
long delay,
java.util.Map<java.lang.String,java.lang.String[]> params)
This will update the service if a service by this name can be found. |
ServiceManager.ServiceScheduleSkipper |
getScheduleSkipper()
Returns the service schedule skipper. |
java.util.Collection<JiraServiceContainer> |
getServices()
This gets all currently registered services with JIRA. |
java.lang.Iterable<JiraServiceContainer> |
getServicesForExecution(long currentTime)
Gets the services that are ready for execution at a particular time. |
JiraServiceContainer |
getServiceWithId(java.lang.Long id)
This will return a JiraServiceContainer for the provided id if one is registered otherwise it will return null. |
JiraServiceContainer |
getServiceWithName(java.lang.String name)
This will returna JiraServiceContainer for the provided name if one is registered, otherwise this will return null. |
void |
refreshAll()
This will force a complete re-synch of the service cache with the values stored in the db. |
void |
refreshService(java.lang.Long id)
This will update the in-memory cache with the values from the db for the service with the id if it can be resolved. |
void |
refreshServiceByName(java.lang.String name)
This will update the in-memory cache with the values from the db for the named service if it can be resolved. |
void |
removeService(java.lang.Long id)
This will remove a service from the db and cache and it will try to resolve the service by id. |
void |
removeServiceByName(java.lang.String name)
This will remove a service from the db and cache and it will try to resolve the service by name. |
Method Detail |
---|
java.util.Collection<JiraServiceContainer> getServices()
JiraServiceContainer addService(java.lang.String name, java.lang.String className, long delay) throws org.ofbiz.core.entity.GenericEntityException, ServiceException, java.lang.ClassNotFoundException
It is preferred to pass the actual Class rather than the class name when adding services to JIRA from plugins, because it avoids possible ClassLoader issues. See http://jira.atlassian.com/browse/JRA-18578.
name
- the key this service is to be known byclassName
- the class defining the servicedelay
- how often the service should run in milliseconds
org.ofbiz.core.entity.GenericEntityException
- If there is a DB error.
ServiceException
- If there is an error creating the Service.
java.lang.ClassNotFoundException
- If the className could not be resolved.addService(String, Class, long)
,
addService(String, String, long, java.util.Map)
JiraServiceContainer addService(java.lang.String name, java.lang.Class<? extends JiraService> serviceClass, long delay) throws org.ofbiz.core.entity.GenericEntityException, ServiceException
It is preferred to pass the actual Class rather than the class name when adding services to JIRA from plugins, because it avoids possible ClassLoader issues. See http://jira.atlassian.com/browse/JRA-18578.
name
- the key this service is to be known byserviceClass
- the class defining the servicedelay
- how often the service should run in milliseconds
org.ofbiz.core.entity.GenericEntityException
- If there is a DB error.
ServiceException
- If there is an error creating the Service.addService(String, String, long)
,
addService(String, Class, long, java.util.Map)
JiraServiceContainer addService(java.lang.String name, java.lang.String className, long delay, java.util.Map<java.lang.String,java.lang.String[]> params) throws org.ofbiz.core.entity.GenericEntityException, ServiceException, java.lang.ClassNotFoundException
It is preferred to pass the actual Class rather than the class name when adding services to JIRA from plugins, because it avoids possible ClassLoader issues. See http://jira.atlassian.com/browse/JRA-18578.
name
- the key this service is to be known byclassName
- the class defining the servicedelay
- how often the service should run in millisecondsparams
- Additional params to specify for the service
org.ofbiz.core.entity.GenericEntityException
- If there is a Db error.
ServiceException
- If there is an error creating the Service.
java.lang.ClassNotFoundException
- If the className could not be resolved.addService(String, Class, long, java.util.Map)
,
addService(String, String, long)
JiraServiceContainer addService(java.lang.String name, java.lang.Class<? extends JiraService> serviceClass, long delay, java.util.Map<java.lang.String,java.lang.String[]> params) throws org.ofbiz.core.entity.GenericEntityException, ServiceException
It is preferred to pass the actual Class rather than the class name when adding services to JIRA from plugins, because it avoids possible ClassLoader issues. See http://jira.atlassian.com/browse/JRA-18578.
name
- the key this service is to be known byserviceClass
- the class defining the servicedelay
- how often the service should run in millisecondsparams
- Additional params to specify for the service
org.ofbiz.core.entity.GenericEntityException
- If there is a Db error.
ServiceException
- If there is an error creating the Service.addService(String, String, long, java.util.Map)
,
addService(String, Class, long)
JiraServiceContainer getServiceWithId(java.lang.Long id) throws java.lang.Exception
id
- service id
java.lang.Exception
- if there is a problem looking up the value in the db.JiraServiceContainer getServiceWithName(java.lang.String name) throws java.lang.Exception
name
- the name of the JiraServiceContainer
java.lang.Exception
- if there is a problem looking up the value in the db.boolean containsServiceWithId(java.lang.Long id)
id
- service id
void editServiceByName(java.lang.String name, long delay, java.util.Map<java.lang.String,java.lang.String[]> params) throws java.lang.Exception
name
- the name of the service to find.delay
- the delay to set on the service in millisecondsparams
- the params to set on the service
java.lang.IllegalArgumentException
- if the name can not be resolved
java.lang.Exception
void editService(java.lang.Long id, long delay, java.util.Map<java.lang.String,java.lang.String[]> params) throws java.lang.Exception
id
- the id of the service to find.delay
- the delay to set on the service in millisecondsparams
- the params to set on the service
java.lang.Exception
- if there is a problem updating the valuevoid refreshServiceByName(java.lang.String name) throws java.lang.Exception
name
- the name of the service to find.
java.lang.IllegalArgumentException
- if the name can not be resolved
java.lang.Exception
void refreshService(java.lang.Long id) throws java.lang.Exception
id
- the id of the service to find.
java.lang.Exception
- if the value can not be refreshedvoid removeServiceByName(java.lang.String name) throws java.lang.Exception
name
- the name of the service to find.
java.lang.IllegalArgumentException
- if the name can not be resolved
java.lang.Exception
void removeService(java.lang.Long id) throws java.lang.Exception
id
- the id of the service to find.
java.lang.Exception
- if there is a problem removing the servicevoid refreshAll()
ServiceManager.ServiceScheduleSkipper getScheduleSkipper()
java.lang.Iterable<JiraServiceContainer> getServicesForExecution(long currentTime)
currentTime
- the time to check for due services.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |