public class CloudDiscoveryServiceJmdnsImpl extends Object implements org.noear.solon.cloud.service.CloudDiscoveryService
| Modifier and Type | Field and Description |
|---|---|
static String |
DOMAIN
服务所属域,使用 local 表示通过 mDNS 在局域网广播从而实现服务发现,其他值则涉及全局DNS服务器
|
static String |
PREFIX
solon 作为固定前缀,区分其他使用 JmDNS 应用
|
| Constructor and Description |
|---|
CloudDiscoveryServiceJmdnsImpl(org.noear.solon.cloud.CloudProps cloudProps) |
| Modifier and Type | Method and Description |
|---|---|
void |
attention(String group,
String service,
org.noear.solon.cloud.CloudDiscoveryHandler observer) |
void |
close()
关闭
|
void |
deregister(String group,
org.noear.solon.cloud.model.Instance instance) |
org.noear.solon.cloud.model.Discovery |
find(String group,
String service) |
Collection<String> |
findServices(String group) |
void |
register(String group,
org.noear.solon.cloud.model.Instance instance) |
void |
registerState(String group,
org.noear.solon.cloud.model.Instance instance,
boolean health) |
public static final String PREFIX
public static final String DOMAIN
public CloudDiscoveryServiceJmdnsImpl(org.noear.solon.cloud.CloudProps cloudProps)
public void register(String group, org.noear.solon.cloud.model.Instance instance)
register in interface org.noear.solon.cloud.service.CloudDiscoveryServicepublic void registerState(String group, org.noear.solon.cloud.model.Instance instance, boolean health)
registerState in interface org.noear.solon.cloud.service.CloudDiscoveryServicepublic void deregister(String group, org.noear.solon.cloud.model.Instance instance)
deregister in interface org.noear.solon.cloud.service.CloudDiscoveryServicepublic org.noear.solon.cloud.model.Discovery find(String group, String service)
find in interface org.noear.solon.cloud.service.CloudDiscoveryServicepublic Collection<String> findServices(String group)
findServices in interface org.noear.solon.cloud.service.CloudDiscoveryServicepublic void attention(String group, String service, org.noear.solon.cloud.CloudDiscoveryHandler observer)
attention in interface org.noear.solon.cloud.service.CloudDiscoveryServicepublic void close()
throws IOException
IOExceptionCopyright © 2025. All rights reserved.