@ThreadSafe
public class RLPClient
extends Object
Represents a process that need to locate resources.
Modifier and Type | Class and Description |
---|---|
static class |
RLPClient.Builder
Builder.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes.
|
Optional<ResourceSpecifier[]> |
doYouProvide(ResourceProvider resourceProvider,
ResourceSpecifier[] resourceSpecifiers,
boolean local,
ElapsedTime timeout)
Do you provide.
|
static RLPClient.Builder |
newBuilder()
Returns a new builder.
|
Optional<ResourceProvider[]> |
whoProvides(ResourceProvider resourceProvider,
ResourceSpecifier[] resourceSpecifiers,
boolean local,
ElapsedTime maximumWait,
ElapsedTime minimumWait)
Who provides.
|
@Nonnull @CheckReturnValue public static RLPClient.Builder newBuilder()
public void close()
@Nonnull @CheckReturnValue public Optional<ResourceSpecifier[]> doYouProvide(@Nonnull ResourceProvider resourceProvider, @Nonnull ResourceSpecifier[] resourceSpecifiers, boolean local, @Nonnull ElapsedTime timeout) throws IOException, InterruptedByTimeoutException
resourceProvider
- A resource provider.resourceSpecifiers
- The resource specifiers.local
- True for local resource providers.timeout
- The timeout interval.IOException
- On failure.InterruptedByTimeoutException
- When interrupted by timeout.@Nonnull @CheckReturnValue public Optional<ResourceProvider[]> whoProvides(@Nonnull ResourceProvider resourceProvider, @Nonnull ResourceSpecifier[] resourceSpecifiers, boolean local, @Nonnull ElapsedTime maximumWait, @Nonnull ElapsedTime minimumWait) throws IOException
This method waits a maximum amount of time to receive at least one response. After each response, it will also wait a minimum amount of time to get an other.
resourceProvider
- A resource provider (broadcast).resourceSpecifiers
- The resource specifiers.local
- True for local resource providers.maximumWait
- The maximum time to wait.minimumWait
- The minimum time to wait.IOException
- On failure.Copyright © 2003-2019 Serge Brisson. All Rights Reserved.