Search in sources :

Example 6 with AdminBiz

use of com.xxl.job.core.biz.AdminBiz in project xxl-job by xuxueli.

the class XxlJobExecutor method initAdminBizList.

private static void initAdminBizList(String adminAddresses, String accessToken) throws Exception {
    if (adminAddresses != null && adminAddresses.trim().length() > 0) {
        for (String address : adminAddresses.trim().split(",")) {
            if (address != null && address.trim().length() > 0) {
                String addressUrl = address.concat(AdminBiz.MAPPING);
                AdminBiz adminBiz = (AdminBiz) new NetComClientProxy(AdminBiz.class, addressUrl, accessToken).getObject();
                if (adminBizList == null) {
                    adminBizList = new ArrayList<AdminBiz>();
                }
                adminBizList.add(adminBiz);
            }
        }
    }
}
Also used : AdminBiz(com.xxl.job.core.biz.AdminBiz) NetComClientProxy(com.xxl.job.core.rpc.netcom.NetComClientProxy)

Aggregations

AdminBiz (com.xxl.job.core.biz.AdminBiz)6 NetComClientProxy (com.xxl.job.core.rpc.netcom.NetComClientProxy)4 RegistryParam (com.xxl.job.core.biz.model.RegistryParam)3 Test (org.junit.Test)3