public class InMemoryDiscoveryService extends Object implements DiscoveryService, DiscoveryServiceClient
DiscoveryService
and DiscoveryServiceClient
.Constructor and Description |
---|
InMemoryDiscoveryService() |
Modifier and Type | Method and Description |
---|---|
ServiceDiscovered |
discover(String name)
Discover service with the given name.
|
Cancellable |
register(Discoverable discoverable)
Registers a
Discoverable service. |
public Cancellable register(Discoverable discoverable)
DiscoveryService
Discoverable
service.register
in interface DiscoveryService
discoverable
- Information of the service provider that could be discovered.Cancellable
for un-registration.public ServiceDiscovered discover(String name)
DiscoveryServiceClient
discover
in interface DiscoveryServiceClient
name
- Name of the serviceServiceDiscovered
object representing the result.Copyright © 2013-2016 The Apache Software Foundation. All rights reserved.