|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ServiceManager
Method Summary | |
---|---|
JiraServiceContainer |
addService(String name,
String clazz,
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(String name,
String clazz,
long delay,
Map 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(Long id)
Quick way of telling whether a service with a specific id is registered or not. |
void |
editService(Long id,
long delay,
Map params)
This will update the service if a service with this id can be found. |
void |
editServiceByName(String name,
long delay,
Map params)
This will update the service if a service by this name can be found. |
Collection |
getServices()
This gets all currently registered services with JIRA. |
JiraServiceContainer |
getServiceWithId(Long id)
This will return a JiraServiceContainer for the provided id if one is registered otherwise it will return null. |
JiraServiceContainer |
getServiceWithName(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(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(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(Long id)
This will remove a service from the db and cache and it will try to resolve the service by id. |
void |
removeServiceByName(String name)
This will remove a service from the db and cache and it will try to resolve the service by name. |
Method Detail |
---|
Collection getServices()
JiraServiceContainer addService(String name, String clazz, long delay) throws Exception
name
- the key this service is to be known byclazz
- the class defining the servicedelay
- how often the service should run in milliseconds
Exception
- if there is a problem creating the serviceJiraServiceContainer addService(String name, String clazz, long delay, Map params) throws Exception
name
- the key this service is to be known byclazz
- the class defining the servicedelay
- how often the service should run in millisecondsparams
- Additional params to specify for the service
Exception
- if there is a problem creating the serviceJiraServiceContainer getServiceWithId(Long id) throws Exception
Exception
- if there is a problem looking up the value in the db.JiraServiceContainer getServiceWithName(String name) throws Exception
name
- the name of the JiraServiceContainer
Exception
- if there is a problem looking up the value in the db.boolean containsServiceWithId(Long id)
void editServiceByName(String name, long delay, Map params) throws 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
IllegalArgumentException
- if the name can not be resolved
Exception
void editService(Long id, long delay, Map params) throws 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
Exception
- if there is a problem updating the valuevoid refreshServiceByName(String name) throws Exception
name
- the name of the service to find.
IllegalArgumentException
- if the name can not be resolved
Exception
void refreshService(Long id) throws Exception
id
- the id of the service to find.
Exception
- if the value can not be refreshedvoid removeServiceByName(String name) throws Exception
name
- the name of the service to find.
IllegalArgumentException
- if the name can not be resolved
Exception
void removeService(Long id) throws Exception
id
- the id of the service to find.
Exception
- if there is a problem removing the servicevoid refreshAll()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |