private ManagementClient(String mgmtAddress, int mgmtPort) { OnlineManagementClient onlineClient = null; try { onlineClient = org.wildfly.extras.creaper.core.ManagementClient.online(OnlineOptions.domain() .forProfile("clustered") .build() .hostAndPort(mgmtAddress, mgmtPort) .auth(LOGIN, PASSWORD) .build() ); } catch (IOException ex) { throw new IllegalStateException("Error during connecting to server CLI.", ex); } ops = new Operations(onlineClient); }
public void reloadServer() throws IOException, TimeoutException, InterruptedException { Administration admin = new Administration(org.wildfly.extras.creaper.core.ManagementClient.online(OnlineOptions.domain() .forHost("master") .build() .hostAndPort(NODE0_ADDRESS, NODE0_PORT) .auth(LOGIN, PASSWORD) .build() )); admin.reload(); }