public class Instance extends Object implements Serializable
| 限定符和类型 | 方法和说明 |
|---|---|
String |
address()
服务地址(host:port)
|
String |
host()
服务主机
|
static Instance |
local() |
static Instance |
localNew(org.noear.solon.core.Signal signal) |
Map<String,String> |
meta() |
String |
metaGet(String name) |
Instance |
metaPut(String name,
String value) |
Instance |
metaPutAll(Iterable<org.noear.solon.core.util.KeyValues<String>> data) |
Instance |
metaPutAll(Map<String,String> data) |
Instance |
metaRemove(String name) |
int |
port()
服务端口
|
String |
protocol()
协议(http, ws, tcp...)
|
Instance |
protocol(String protocol) |
String |
service()
服务名;实例化后不能修改
|
String |
serviceAndAddress() |
List<String> |
tags() |
Instance |
tagsAdd(String tag) |
Instance |
tagsAddAll(Collection<String> list) |
String |
toString() |
String |
uri() |
double |
weight() |
Instance |
weight(double weight) |
public String service()
public String host()
public int port()
public String address()
public String serviceAndAddress()
public String protocol()
public String uri()
public double weight()
public Instance weight(double weight)
public Instance tagsAddAll(Collection<String> list)
public static Instance local()
public static Instance localNew(org.noear.solon.core.Signal signal)
Copyright © 2024. All rights reserved.