@Override public ModelNode execute(ModelNode modelNode) throws IOException { ModelNode result; CloseableHttpResponse response = client.execute(buildRequest(modelNode)); try { result = parseResponse(response); } finally { response.close(); } return result; }
@Override public ModelNode execute(Operation operation, OperationMessageHandler handler) throws IOException { return execute(operation); }
if (username != null && password != null) { credentialsProvider.setCredentials( new AuthScope(host, port, getManagementRealm(url), AuthSchemes.DIGEST), new UsernamePasswordCredentials(username, password));
modelControllerClient = new HttpModelControllerClient(host, port, username, password, connectionTimeout, sslOptions); try {
@Override public ModelNode execute(ModelNode modelNode, OperationMessageHandler handler) throws IOException { return execute(modelNode); }
@Override public OperationResponse executeOperation(Operation operation, OperationMessageHandler handler) throws IOException { return OperationResponse.Factory.createSimple(execute(operation)); }
@Override public ModelNode execute(Operation operation) throws IOException { if (!operation.getInputStreams().isEmpty()) { throw new IllegalStateException("Operation has one or more attachments which is not allowed."); } return execute(operation.getOperation()); }