|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sonatype.aether.impl.internal.DefaultServiceLocator
public class DefaultServiceLocator
A simple service locator that is already setup with all components from this library. To acquire a complete repository system, clients need to add an artifact descriptor, a version resolver, a version range resolver and some repository connectors.
| Constructor Summary | |
|---|---|
DefaultServiceLocator()
Creates a new service locator that already knows about all service implementations included this library. |
|
| Method Summary | ||
|---|---|---|
|
addService(java.lang.Class<T> type,
java.lang.Class<? extends T> impl)
Adds the implementation class for a service. |
|
|
getService(java.lang.Class<T> type)
Gets an instance of the specified service. |
|
|
getServices(java.lang.Class<T> type)
Gets all available instances of the specified service. |
|
protected void |
serviceCreationFailed(java.lang.Class<?> type,
java.lang.Class<?> impl,
java.lang.Throwable exception)
|
|
|
setService(java.lang.Class<T> type,
java.lang.Class<? extends T> impl)
Sets the implementation class for a service. |
|
|
setServices(java.lang.Class<T> type,
T... services)
Sets the instances for a service. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultServiceLocator()
| Method Detail |
|---|
public <T> DefaultServiceLocator setService(java.lang.Class<T> type,
java.lang.Class<? extends T> impl)
T - The service type.type - The interface describing the service, must not be null.impl - The implementation class of the service, must not be null.
null.
public <T> DefaultServiceLocator addService(java.lang.Class<T> type,
java.lang.Class<? extends T> impl)
T - The service type.type - The interface describing the service, must not be null.impl - The implementation class of the service, must not be null.
null.
public <T> DefaultServiceLocator setServices(java.lang.Class<T> type,
T... services)
T - The service type.type - The interface describing the service, must not be null.services - The instances of the service, must not be null.
null.public <T> T getService(java.lang.Class<T> type)
ServiceLocator
getService in interface ServiceLocatorT - The service type.type - The interface describing the service, must not be null.
null if the service could not be located/initialized.public <T> java.util.List<T> getServices(java.lang.Class<T> type)
ServiceLocator
getServices in interface ServiceLocatorT - The service type.type - The interface describing the service, must not be null.
null.
protected void serviceCreationFailed(java.lang.Class<?> type,
java.lang.Class<?> impl,
java.lang.Throwable exception)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||