org.jboss.weld.bootstrap.api
Interface ServiceRegistry

All Superinterfaces:
Iterable<Service>
All Known Implementing Classes:
ForwardingServiceRegistry, SimpleServiceRegistry

public interface ServiceRegistry
extends Iterable<Service>

A service registry

Author:
Pete Muir

Method Summary
<S extends Service>
void
add(Class<S> type, S service)
          Add a service
 void addAll(Collection<Map.Entry<Class<? extends Service>,Service>> services)
          Add services
 void cleanup()
          Clear up the services registered, by calling Service.cleanup() on each registered service
<S extends Service>
boolean
contains(Class<S> type)
          Check if a service is registered
 Set<Map.Entry<Class<? extends Service>,Service>> entrySet()
           
<S extends Service>
S
get(Class<S> type)
          Retrieve a service implementation
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

add

<S extends Service> void add(Class<S> type,
                             S service)
Add a service

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

addAll

void addAll(Collection<Map.Entry<Class<? extends Service>,Service>> services)
Add services

Parameters:
services -

entrySet

Set<Map.Entry<Class<? extends Service>,Service>> entrySet()

get

<S extends Service> S get(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(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

cleanup

void cleanup()
Clear up the services registered, by calling Service.cleanup() on each registered service



Copyright © 2013 Seam Framework. All Rights Reserved.