public abstract class ForwardingResourceManager extends ForwardingManager implements ResourceManager
Note that this class does not forward the equals
and hashCode methods through to the backing object. See
ForwardingObject
for more details.
| Modifier | Constructor and Description |
|---|---|
protected |
ForwardingResourceManager()
Constructor for use by subclasses.
|
| Modifier and Type | Method and Description |
|---|---|
<L extends Listener> |
assignables(java.lang.Class<L> type)
Returns a set of resources assignable to the specified listener type.
|
protected abstract ResourceManager |
delegate() |
<L extends Listener> |
register(java.lang.Class<L> type,
Resource<? super L> resource)
Registers a resource with the given listener type.
|
<L extends Listener> |
registrables(java.lang.Class<L> type)
Returns a set of resources registrable with the specified listener type.
|
com.google.common.collect.SetMultimap<java.lang.Class<? extends Listener>,Resource<?>> |
registrations()
Returns a set multimap of listener types to all registered resources.
|
<L extends Listener> |
unregister(java.lang.Class<L> type,
Resource<? super L> resource)
Unregisters a resource with the given listener type.
|
<L extends Listener> |
unregisterAll(java.lang.Class<L> type)
Unregisters all resources assignable to the specified listener type.
|
getNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitequals, hashCode, registeredprotected ForwardingResourceManager()
protected abstract ResourceManager delegate()
delegate in class ForwardingManagerpublic <L extends Listener> void register(java.lang.Class<L> type, Resource<? super L> resource)
ResourceManagerNote that this method propagates any exception
thrown by the specified resource as a cause of a
ResourceRegistrationException instance.
register in interface ResourceManagertype - the listener type with which the specified
resource is to be registered, not nullresource - the resource to be registered with the specified
listener type, not nullpublic <L extends Listener> void unregister(java.lang.Class<L> type, Resource<? super L> resource)
ResourceManagerNote that this method propagates any exception
thrown by the specified resource as a cause of a
ResourceUnregistrationException instance.
unregister in interface ResourceManagertype - the listener type with which the specified
resource is to be unregistered, not nullresource - the resource to be unregistered from the specified
listener type, not nullpublic <L extends Listener> void unregisterAll(java.lang.Class<L> type)
ResourceManagerNote that this method collects all exceptions thrown by resources
during the unregistration process and propagates them as suppressed
exceptions of a ResourceUnregistrationException instance.
unregisterAll in interface ResourceManagertype - the listener type to which the assignable resources
are going be unregistered, not nullpublic <L extends Listener> java.util.Set<Resource<? extends L>> assignables(java.lang.Class<L> type)
ResourceManagerA resource is assignable to a given listener type if the listener type supported by the resource is assignable to the given listener type.
assignables in interface ResourceManagerpublic <L extends Listener> java.util.Set<Resource<? super L>> registrables(java.lang.Class<L> type)
ResourceManagerA resource is registrable with a given listener type if the listener type supported by the resource is equal to the given listener type or one of its superinterfaces.
registrables in interface ResourceManagerpublic com.google.common.collect.SetMultimap<java.lang.Class<? extends Listener>,Resource<?>> registrations()
ResourceManagerregistrations in interface ResourceManager