|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.openexchange.admin.services.AdminServiceRegistry
public final class AdminServiceRegistry
AdminServiceRegistry
- A registry for services needed by admin.
Method Summary | ||
---|---|---|
|
addService(java.lang.Class<? extends S> clazz,
S service)
Adds a service bound to given class to this service registry |
|
void |
clearRegistry()
Clears the whole registry |
|
static AdminServiceRegistry |
getInstance()
Gets the admin's service registry |
|
|
getService(java.lang.Class<? extends S> clazz,
boolean failOnError)
Gets the service defined by given class |
|
void |
removeService(java.lang.Class<?> clazz)
Removes a service bound to given class from this service registry |
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public static AdminServiceRegistry getInstance()
public void clearRegistry()
public void removeService(java.lang.Class<?> clazz)
clazz
- The service's classpublic <S> void addService(java.lang.Class<? extends S> clazz, S service)
clazz
- The service's classservice
- The service itselfpublic <S> S getService(java.lang.Class<? extends S> clazz, boolean failOnError) throws com.openexchange.server.ServiceException
S
- The type of service's classclazz
- The service's classfailOnError
- true
to throw an appropriate ServiceException
if service is missing; otherwise
false
null
or an appropriate ServiceException
is thrown dependent on
failOnError
parameter.
com.openexchange.server.ServiceException
- If failOnError
parameter is set to true
and service is missingpublic java.lang.String toString()
toString
in class java.lang.Object
|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |