Tabnine Logo
ManagementClient.executeForResult
Code IndexAdd Tabnine to your IDE (free)

How to use
executeForResult
method
in
org.jboss.as.arquillian.container.ManagementClient

Best Java code snippets using org.jboss.as.arquillian.container.ManagementClient.executeForResult (Showing top 6 results out of 315)

origin: org.jboss.as/jboss-as-arquillian-common

private ModelNode readResource(ModelNode address) throws Exception {
  final ModelNode operation = new ModelNode();
  operation.get(OP).set(READ_RESOURCE_OPERATION);
  operation.get(RECURSIVE).set("true");
  operation.get(OP_ADDR).set(address);
  return executeForResult(operation);
}
origin: org.wildfly/wildfly-arquillian-common

private ModelNode readResource(ModelNode address) throws Exception {
  final ModelNode operation = new ModelNode();
  operation.get(OP).set(READ_RESOURCE_OPERATION);
  operation.get(RECURSIVE).set("true");
  operation.get(OP_ADDR).set(address);
  return executeForResult(operation);
}
origin: org.wildfly/wildfly-arquillian-common

private URI getBinding(final String protocol, final String socketBinding) {
  try {
    final String socketBindingGroupName = rootNode.get("socket-binding-group").keys().iterator().next();
    final ModelNode operation = new ModelNode();
    operation.get(OP_ADDR).get("socket-binding-group").set(socketBindingGroupName);
    operation.get(OP_ADDR).get("socket-binding").set(socketBinding);
    operation.get(OP).set(READ_RESOURCE_OPERATION);
    operation.get("include-runtime").set(true);
    ModelNode binding = executeForResult(operation);
    String ip = binding.get("bound-address").asString();
    //it appears some system can return a binding with the zone specifier on the end
    if (ip.contains(":") && ip.contains("%")) {
      ip = ip.split("%")[0];
    }
    final int port = defined(binding.get("bound-port"), socketBindingGroupName + " -> " + socketBinding + " -> bound-port is undefined").asInt();
    return URI.create(protocol + "://" + NetworkUtils.formatPossibleIpv6Address(ip) + ":" + port);
  } catch (Exception e) {
    throw new RuntimeException(e);
  }
}
origin: org.jboss.as/jboss-as-arquillian-common

private URI getBinding(final String protocol, final String socketBinding) {
  try {
    //TODO: resolve socket binding group correctly
    final String socketBindingGroupName = rootNode.get("socket-binding-group").keys().iterator().next();
    final ModelNode operation = new ModelNode();
    operation.get(OP_ADDR).get("socket-binding-group").set(socketBindingGroupName);
    operation.get(OP_ADDR).get("socket-binding").set(socketBinding);
    operation.get(OP).set(READ_ATTRIBUTE_OPERATION);
    operation.get(NAME).set("bound-address");
    String ip = executeForResult(operation).asString();
    //it appears some system can return a binding with the zone specifier on the end
    if(ip.contains(":") && ip.contains("%")) {
      ip = ip.split("%")[0];
    }
    final ModelNode portOp = new ModelNode();
    portOp.get(OP_ADDR).get("socket-binding-group").set(socketBindingGroupName);
    portOp.get(OP_ADDR).get("socket-binding").set(socketBinding);
    portOp.get(OP).set(READ_ATTRIBUTE_OPERATION);
    portOp.get(NAME).set("bound-port");
    final int port = defined(executeForResult(portOp), socketBindingGroupName + " -> " + socketBinding + " -> bound-port is undefined").asInt();
    return URI.create(protocol + "://" + NetworkUtils.formatPossibleIpv6Address(ip) + ":" + port);
  } catch (Exception e) {
    throw new RuntimeException(e);
  }
}
origin: wildfly/wildfly-arquillian

sbgOp.get(OP).set(READ_CHILDREN_NAMES_OPERATION);
sbgOp.get(CHILD_TYPE).set("socket-binding-group");
final ModelNode socketBindingGroups = executeForResult(sbgOp);
final String socketBindingGroupName = socketBindingGroups.asList().get(0).asString();
final ModelNode operation = new ModelNode();
operation.get(OP).set(READ_RESOURCE_OPERATION);
operation.get("include-runtime").set(true);
ModelNode binding = executeForResult(operation);
if (host == null) {
  host = formatIP(binding.get("bound-address").asString());
origin: org.wildfly.arquillian/wildfly-arquillian-common

sbgOp.get(OP).set(READ_CHILDREN_NAMES_OPERATION);
sbgOp.get(CHILD_TYPE).set("socket-binding-group");
final ModelNode socketBindingGroups = executeForResult(sbgOp);
final String socketBindingGroupName = socketBindingGroups.asList().get(0).asString();
final ModelNode operation = new ModelNode();
operation.get(OP).set(READ_RESOURCE_OPERATION);
operation.get("include-runtime").set(true);
ModelNode binding = executeForResult(operation);
if (host == null) {
  host = formatIP(binding.get("bound-address").asString());
org.jboss.as.arquillian.containerManagementClientexecuteForResult

Popular methods of ManagementClient

  • getControllerClient
    Returns the client used to connect to the server.
  • <init>
  • close
  • checkSuccessful
  • defined
  • extractEnterpriseArchiveContexts
    Expects the deploymentNode to bit a list of addresses which contain a result of the subsystem model.
  • extractWebArchiveContexts
  • getConnection
  • getProtocolMetaData
    Gets the meta-data.
  • getRemoteEjbURL
    Returns the URI for EJB's.
  • getRemoteJMXURL
  • getWebUri
  • getRemoteJMXURL,
  • getWebUri,
  • isEnterpriseArchive,
  • isWebArchive,
  • toContextName,
  • createDeploymentAddress,
  • getBinding,
  • isServerInRunningState,
  • readResource

Popular in Java

  • Finding current android device location
  • setContentView (Activity)
  • addToBackStack (FragmentTransaction)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now