async
Interface ASyncServiceInspector

All Known Subinterfaces:
ASyncServiceManager
All Known Implementing Classes:
ASync

public interface ASyncServiceInspector

An interface through which a service can inspect what other services are using the ASync instance by finding their respective keys.

Author:
Michael Parker

Method Summary
 boolean containsServiceKey(ASyncServiceKey key)
          Returns whether a service with the provided key is registered with this ASync instance.
 java.util.List<ASyncServiceKey> getActiveServiceKeys()
          Returns a list of the keys belonging to all active services registered with this ASync instance.
 java.util.List<ASyncServiceKey> getInactiveServiceKeys()
          Returns a list of the keys belonging to all inactive services registered with this ASync instance.
 

Method Detail

containsServiceKey

boolean containsServiceKey(ASyncServiceKey key)
Returns whether a service with the provided key is registered with this ASync instance. If this is true, its key is either in the list returned by getActiveServiceKeys or the list returned by getInactiveServiceKeys.

Parameters:
key - the key of the service to query as registered
Returns:
true if the service with the key is registered, false otherwise

getActiveServiceKeys

java.util.List<ASyncServiceKey> getActiveServiceKeys()
Returns a list of the keys belonging to all active services registered with this ASync instance. Note that the list is immutable, and so attempting to add or remove keys through the list will not change the services and keys registered with the corresponding ASync instance.

Returns:
a list of keys belonging to all active and registered services

getInactiveServiceKeys

java.util.List<ASyncServiceKey> getInactiveServiceKeys()
Returns a list of the keys belonging to all inactive services registered with this ASync instance. Note that the list is immutable, and so attempting to add or remove keys through the list will not change the services and keys registered with the corresponding ASync instance.

Returns:
a list of keys belonging to all inactive and registered services