|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.seraph.ioc.ApplicationServicesRegistry
public class ApplicationServicesRegistry
This class represents an extension point for Seraph. Applications that use Seraph library can register implementations of service interfaces
defined by Seraph. To register an implementation host application must call an appropriate setter method eg. setRememberMeService(RememberMeService)
Once host application registers a service Seraph will use the registered service. Host application may chose not to register a service,
in such case Seraph will use default Noop implementation of it. E.g. if a host application does not set a RememberMeService through
setRememberMeService(RememberMeService) Seraph will use a NoopRememberMeService implementation of RememberMeService.
If in the future Seraph defines new SPIs and expects host application to provide implementations for them then this class will have to add
setters and getters definitions for new interfaces.
| Constructor Summary | |
|---|---|
ApplicationServicesRegistry()
|
|
| Method Summary | |
|---|---|
static RememberMeService |
getRememberMeService()
Returns a RememberMeService that was set by an application via setRememberMeService(RememberMeService)
or a NoopRememberMeService if application has not set one. |
static void |
setRememberMeService(RememberMeService rememberMeService)
This method provides the ability for a host application to set an implementation of RememberMeService for Seraph to use. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ApplicationServicesRegistry()
| Method Detail |
|---|
public static void setRememberMeService(RememberMeService rememberMeService)
RememberMeService for Seraph to use.
If host application does not set its implementation of RememberMeService Seraph will use a NoopRememberMeService.
rememberMeService -
java.lang.IllegalArgumentException - if argument is nullpublic static RememberMeService getRememberMeService()
setRememberMeService(RememberMeService)
or a NoopRememberMeService if application has not set one. Will never return null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||