org.jboss.webbeans.bootstrap.api
Interface ServiceRegistry

All Known Implementing Classes:
ForwardingServiceRegistry, SimpleServiceRegistry

public interface ServiceRegistry

A service registry

Author:
Pete Muir

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
<S extends Service>
S
get(java.lang.Class<S> type)
          Retrieve a service implementation
 

Method Detail

add

<S extends Service> void add(java.lang.Class<S> type,
                             S service)
Add a service to bootstrap

Type Parameters:
S - the service type to add
Parameters:
serviceType - the service type to add
service - the service implementation
See Also:
Service

get

<S extends Service> S get(java.lang.Class<S> type)
Retrieve a service implementation

Type Parameters:
S - the service type
Parameters:
serviceType - the service type
Returns:
the service implementation, or null if none is registered

contains

<S extends Service> boolean contains(java.lang.Class<S> type)
Check if a service is registered

Type Parameters:
S - the service type
Parameters:
serviceType - the service type
Returns:
true if a service is registered, otherwise false


Copyright © 2011. All Rights Reserved.