java.lang.AutoCloseable, java.io.CloseableServiceProviderImplpublic interface ServiceProvider<T>
extends java.io.Closeable
ProviderStrategy
paired with an InstanceProvider| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
Close the provider.
|
java.util.Collection<ServiceInstance<T>> |
getAllInstances() |
Return the current available set of instances IMPORTANT: users
should not hold on to the instance returned.
|
ServiceInstance<T> |
getInstance() |
Return an instance for a single use.
|
void |
noteError(ServiceInstance<T> instance) |
Take note of an error connecting to the given instance.
|
void |
start() |
The provider must be started before use
|
void start()
throws java.lang.Exception
java.lang.Exception - any errorsServiceInstance<T> getInstance() throws java.lang.Exception
java.lang.Exception - any errorsjava.util.Collection<ServiceInstance<T>> getAllInstances() throws java.lang.Exception
java.lang.Exception - any errorsvoid noteError(ServiceInstance<T> instance)
DownInstancePolicy.instance - instance that had an errorvoid close()
throws java.io.IOException
close in interface java.lang.AutoCloseableclose in interface java.io.Closeablejava.io.IOExceptionCopyright © 2011–2018 The Apache Software Foundation. All rights reserved.