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

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

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

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

port = defined(binding.get("bound-port"),
    socketBindingGroupName + " -> " + socketBinding + " -> bound-port is undefined").asInt();
origin: org.wildfly.arquillian/wildfly-arquillian-common

port = defined(binding.get("bound-port"),
    socketBindingGroupName + " -> " + socketBinding + " -> bound-port is undefined").asInt();
org.jboss.as.arquillian.containerManagementClientdefined

Popular methods of ManagementClient

  • getControllerClient
    Returns the client used to connect to the server.
  • <init>
  • close
  • checkSuccessful
  • executeForResult
  • 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

  • Reading from database using SQL prepared statement
  • addToBackStack (FragmentTransaction)
  • getSystemService (Context)
  • findViewById (Activity)
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • Socket (java.net)
    Provides a client-side TCP socket.
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • 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