org.apache.hivemind.annotations.internal
Class TypedRegistryImpl

java.lang.Object
  extended by org.apache.hivemind.annotations.internal.TypedRegistryImpl
All Implemented Interfaces:
TypedRegistry

public class TypedRegistryImpl
extends java.lang.Object
implements TypedRegistry

Implementation of TypedRegistry. Wraps an instance of RegistryInfrastructure to provide registry access.

Author:
Huegen

Constructor Summary
TypedRegistryImpl(org.apache.hivemind.internal.Module callingModule, org.apache.hivemind.internal.RegistryInfrastructure delegate)
           
 
Method Summary
 org.apache.hivemind.service.Autowiring getAutowiring()
          Returns a reference to the Autowiring service.
<T> T
getConfiguration(java.lang.Class<T> configurationType)
          Finds a configuration by its type.
<T> T
getConfiguration(java.lang.String configurationId, java.lang.Class<T> configurationType)
          Returns the specified configuration from the registry.
<T> T
getService(java.lang.Class<T> serviceInterface)
          Finds a service that implements the provided interface.
<T> T
getService(java.lang.String serviceId, java.lang.Class<T> serviceInterface)
          Returns a service from the registry.
 void shutdown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypedRegistryImpl

public TypedRegistryImpl(org.apache.hivemind.internal.Module callingModule,
                         org.apache.hivemind.internal.RegistryInfrastructure delegate)
Parameters:
callingModule - the module that gets access registry access by this instance. Used for visibility checks when services and configurations are retrieved. Can be null, in this case only public extension points are visible.
delegate -
Method Detail

getConfiguration

public <T> T getConfiguration(java.lang.String configurationId,
                              java.lang.Class<T> configurationType)
Description copied from interface: TypedRegistry
Returns the specified configuration from the registry.

Specified by:
getConfiguration in interface TypedRegistry
See Also:
TypedRegistry.getConfiguration(java.lang.String, java.lang.Class)

getConfiguration

public <T> T getConfiguration(java.lang.Class<T> configurationType)
Description copied from interface: TypedRegistry
Finds a configuration by its type. Exactly one such configuration may exist or an exception is thrown.

Specified by:
getConfiguration in interface TypedRegistry
See Also:
TypedRegistry.getConfiguration(java.lang.Class)

getService

public <T> T getService(java.lang.String serviceId,
                        java.lang.Class<T> serviceInterface)
Description copied from interface: TypedRegistry
Returns a service from the registry.

Specified by:
getService in interface TypedRegistry
See Also:
TypedRegistry.getService(java.lang.String, java.lang.Class)

getService

public <T> T getService(java.lang.Class<T> serviceInterface)
Description copied from interface: TypedRegistry
Finds a service that implements the provided interface. Exactly one such service may exist or an exception is thrown.

Specified by:
getService in interface TypedRegistry
See Also:
TypedRegistry.getService(java.lang.Class)

getAutowiring

public org.apache.hivemind.service.Autowiring getAutowiring()
Description copied from interface: TypedRegistry
Returns a reference to the Autowiring service.

Specified by:
getAutowiring in interface TypedRegistry
See Also:
TypedRegistry.getAutowiring()

shutdown

public void shutdown()
Specified by:
shutdown in interface TypedRegistry
See Also:
TypedRegistry.shutdown()


Copyright © 2006-2007 Apache Software Foundation. All Rights Reserved.