|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectcom.baidu.driver4j.bns.BNSQueryProxy
public class BNSQueryProxy
BNS query access proxy class.
This is the main entry class for all operation access for BNS.
| 字段摘要 | |
|---|---|
protected String |
bnsServerUrl
|
protected int |
connectTimeout
|
protected static String |
DEFAULT_BNS_SERVER
|
protected static String |
GROUP_OPER
Service group operation path |
protected String |
groupOperUrl
|
protected static String |
INSTANCE_OPER
instance operation path |
protected String |
instanceOperUrl
|
protected static String |
PARAM_JOINER
|
protected static String |
PARAM_MARK
|
protected int |
readTimeout
|
protected String |
serivceOperUrl
|
protected static String |
SERVICE_OPER
service operation path |
protected SimpleHttpRequestExecutor |
simpleHttpRequestExecutor
|
| 构造方法摘要 | |
|---|---|
protected |
BNSQueryProxy(String bnsServerUrl)
|
| 方法摘要 | |
|---|---|
BNSResponse |
getBNSResponseByServiceName(String serviceName,
String command)
服务名称查询返回数据流 |
protected String |
getBnsServerUrl()
|
protected int |
getConnectTimeout()
|
protected String |
getGroupOperUrl()
|
Instance |
getInstance(String serviceName,
String hostName)
服务(组)实例信息查询 |
protected String |
getInstanceOperUrl()
|
List<Instance> |
getInstances(String serviceName)
服务(组)实例信息查询 |
List<Instance> |
getInstances(String serviceName,
boolean enabledOnly)
服务(组)实例信息查询 |
List<Instance> |
getInstances(String serviceName,
int... status)
服务(组)实例信息查询, |
List<Instance> |
getInstancesByServiceGroup(String name)
根据名称查询服务组下的实例信息 |
protected int |
getReadTimeout()
|
protected String |
getSerivceOperUrl()
|
Service |
getService(String serviceName)
服务名称查询服务信息 |
Group |
getServiceGroup(String name)
根据名称查询服务组信息 |
List<String> |
getServiceGroupListByNodePath(String nodePath)
获取某节点路径下的服务组列表 |
boolean |
isServiceExist(String serviceName)
check service name exist. |
protected void |
logHTTPRequestInfo(String serviceUrl,
String method)
输出日志信息 |
static BNSQueryProxy |
proxy()
|
static BNSQueryProxy |
proxy(String bnsServerUrl)
|
List<Instance> |
queryInstances(String serviceName)
服务(组)实例信息查询 |
List<String> |
queryServiceGroupName(String serviceName)
服务组搜索 |
List<String> |
queryServiceName(String serviceName)
服务搜索 |
void |
setConnectTimeout(int connectTimeout)
|
void |
setReadTimeout(int readTimeout)
|
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 字段详细信息 |
|---|
protected static final String DEFAULT_BNS_SERVER
protected static final String SERVICE_OPER
protected static final String INSTANCE_OPER
protected static final String GROUP_OPER
protected static final String PARAM_MARK
protected static final String PARAM_JOINER
protected String bnsServerUrl
protected String serivceOperUrl
protected String instanceOperUrl
protected String groupOperUrl
protected int connectTimeout
protected int readTimeout
protected SimpleHttpRequestExecutor simpleHttpRequestExecutor
| 构造方法详细信息 |
|---|
protected BNSQueryProxy(String bnsServerUrl)
| 方法详细信息 |
|---|
public static BNSQueryProxy proxy(String bnsServerUrl)
public static BNSQueryProxy proxy()
public Service getService(String serviceName)
throws BNSException
serviceName - service name
BNSException - in case of access BNS service failed
public boolean isServiceExist(String serviceName)
throws BNSException
serviceName - service name
BNSException - in case of access BNS service failed
public BNSResponse getBNSResponseByServiceName(String serviceName,
String command)
throws BNSException
serviceName - service name
BNSException - in case of access BNS service failed
public Instance getInstance(String serviceName,
String hostName)
throws BNSException
serviceName - 服务(组名称hostName - 实例名称
BNSException - in case of access BNS service failed
public List<Instance> getInstances(String serviceName)
throws BNSException
serviceName - 服务(组名称
BNSException - in case of access BNS service failed
public List<Instance> getInstances(String serviceName,
boolean enabledOnly)
throws BNSException
serviceName - 服务(组名称enabledOnly - if true only get enabled instance
BNSException - in case of access BNS service failed
public List<Instance> getInstances(String serviceName,
int... status)
throws BNSException
serviceName - 服务(组名称status - filter by status properties
BNSException - in case of access BNS service failed
public List<String> queryServiceName(String serviceName)
throws BNSException
serviceName - service name
BNSException - in case of access BNS service failed
public List<String> queryServiceGroupName(String serviceName)
throws BNSException
serviceName - service name
BNSException - in case of access BNS service failed
public Group getServiceGroup(String name)
throws BNSException
name - group name
Group or null if not exist
BNSException - in case of access BNS service failed
public List<Instance> getInstancesByServiceGroup(String name)
throws BNSException
name - group name
Group or empty if group not exist or no service under the group
BNSException - in case of access BNS service failed
public List<String> getServiceGroupListByNodePath(String nodePath)
throws BNSException
nodePath - nodePath 节点路径,如BAIDU_OP_OPED_NOAH
BNSException - in case of access BNS service failed
protected void logHTTPRequestInfo(String serviceUrl,
String method)
serviceUrl - target HTTP service URL to logmethod - method nameprotected int getConnectTimeout()
protected int getReadTimeout()
protected String getSerivceOperUrl()
protected String getInstanceOperUrl()
protected String getGroupOperUrl()
protected String getBnsServerUrl()
public void setConnectTimeout(int connectTimeout)
public void setReadTimeout(int readTimeout)
public List<Instance> queryInstances(String serviceName)
throws BNSException
InstanceQuery 复制的描述
InstanceQuery 中的 queryInstancesserviceName - 服务(组名称
BNSException - in case of access BNS service failed
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||