org.jboss.webbeans.bootstrap.api.helpers
Class ForwardingServiceRegistry

java.lang.Object
  extended by org.jboss.webbeans.bootstrap.api.helpers.ForwardingServiceRegistry
All Implemented Interfaces:
java.lang.Iterable<Service>, ServiceRegistry

public abstract class ForwardingServiceRegistry
extends java.lang.Object
implements ServiceRegistry


Constructor Summary
ForwardingServiceRegistry()
           
 
Method Summary
<S extends Service>
void
add(java.lang.Class<S> type, S service)
          Add a service to bootstrap
<S extends Service>
boolean
contains(java.lang.Class<S> type)
          Check if a service is registered
protected abstract  ServiceRegistry delegate()
           
<S extends Service>
S
get(java.lang.Class<S> type)
          Retrieve a service implementation
 java.util.Iterator<Service> iterator()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ForwardingServiceRegistry

public ForwardingServiceRegistry()
Method Detail

delegate

protected abstract ServiceRegistry delegate()

add

public <S extends Service> void add(java.lang.Class<S> type,
                                    S service)
Description copied from interface: ServiceRegistry
Add a service to bootstrap

Specified by:
add in interface ServiceRegistry
Type Parameters:
S - the service type to add
service - the service implementation
See Also:
Service

contains

public <S extends Service> boolean contains(java.lang.Class<S> type)
Description copied from interface: ServiceRegistry
Check if a service is registered

Specified by:
contains in interface ServiceRegistry
Type Parameters:
S - the service type
Returns:
true if a service is registered, otherwise false

get

public <S extends Service> S get(java.lang.Class<S> type)
Description copied from interface: ServiceRegistry
Retrieve a service implementation

Specified by:
get in interface ServiceRegistry
Type Parameters:
S - the service type
Returns:
the service implementation, or null if none is registered

iterator

public java.util.Iterator<Service> iterator()
Specified by:
iterator in interface java.lang.Iterable<Service>


Copyright © 2008-2009. All Rights Reserved.