Methods Summary |
---|
public static Container | findContainer(java.lang.String oid)Find a potential container.
return containers.get(oid);
|
public static Container | getContainer(java.lang.String oid)Returns the container specified by the given canocical object name.
Never returns null.
if(!hasContainer(oid))
throw new IllegalStateException("Container " + oid + " is not registered");
return containers.get(oid);
|
public static java.util.Collection | getContainers()Returns an unmodifiable collection of the registered containers.
return Collections.unmodifiableCollection(containers.values());
|
public static boolean | hasContainer(java.lang.String oid)Reports the existance of a container.
return containers.containsKey(oid);
|
private static final java.lang.String | oid(Container container)
return container.getObjectName().getCanonicalName();
|
public static void | register(Container container)Registers a container.
String oid = oid(container);
if(hasContainer(oid))
throw new IllegalStateException("Container " + oid + " + is already registered");
containers.put(oid, container);
|
public static void | unregister(Container container)Unregisters a container.
String oid = oid(container);
if(!hasContainer(oid))
throw new IllegalStateException("Container " + oid + " + is not registered");
containers.remove(oid);
|