|
NextApp Echo3 v3.0.b4 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object nextapp.echo.webcontainer.ServiceRegistry
public class ServiceRegistry
A registry of Service
objects that may be recalled based
on Id
values.
Constructor Summary | |
---|---|
ServiceRegistry()
Creates a new ServiceRegistry . |
Method Summary | |
---|---|
void |
add(Service service)
Adds a service to the registry. |
Service |
get(java.lang.String id)
Returns the service with the specified Id . |
void |
remove(Service service)
Removes a service from the registry. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ServiceRegistry()
ServiceRegistry
.
Method Detail |
---|
public void add(Service service)
By default, this will throw an IllegalArgumentException
if an attempt to register two different service objects under the same
service id is made.
However, there may be times when it is desirable to simply ignore these extra requests and return without throwing an exception, such as when a JVM-level shared memory cache is in operation within a cluster. In this situation, the service registry may have already been populated by another node member, and when the application is first invoked an another node member, attempts will be made to populate the registry again. In this situation, we just ignore the superfluous requests.
In order to turn off the duplicate service id exception for this scenario,
specify the system property nextapp.echo.webcontainer.ServiceRegistry.disableDuplicateServiceCheck
with a value of true
.
service
- The service to be added.public Service get(java.lang.String id)
Id
.
id
- The Id
of the service to be retrieved.
id
.public void remove(Service service)
service
- The service to be removed.
|
NextApp Echo3 v3.0.b4 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |