Search in sources :

Example 1 with ConnectionResult

use of com.alibaba.druid.admin.model.dto.ConnectionResult in project druid by alibaba.

the class MonitorStatService method getPoolingConnectionInfoByDataSourceId.

public String getPoolingConnectionInfoByDataSourceId(Integer id, String serviceId) {
    getAllServiceNodeMap();
    ServiceNode serviceNode = serviceIdMap.get(serviceId);
    String url = "http://" + serviceNode.getAddress() + ":" + serviceNode.getPort() + "/druid/connectionInfo-" + id + ".json";
    ConnectionResult connectionResult = HttpUtil.get(url, ConnectionResult.class);
    return JSON.toJSONString(connectionResult);
}
Also used : ServiceNode(com.alibaba.druid.admin.model.ServiceNode) ConnectionResult(com.alibaba.druid.admin.model.dto.ConnectionResult)

Aggregations

ServiceNode (com.alibaba.druid.admin.model.ServiceNode)1 ConnectionResult (com.alibaba.druid.admin.model.dto.ConnectionResult)1