congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
org.jboss.as.host.controller.model.jvm
Code IndexAdd Tabnine to your IDE (free)

How to use org.jboss.as.host.controller.model.jvm

Best Java code snippets using org.jboss.as.host.controller.model.jvm (Showing top 20 results out of 315)

origin: org.wildfly.core/wildfly-host-controller

public static JvmOptionsBuilderFactory getInstance(final JvmType jvmType) {
  return new JvmOptionsBuilderFactory(jvmType);
}
origin: org.jboss.as/jboss-as-host-controller

  @Override
  void addPermGen(JvmElement jvmElement, List<String> command) {
    if (jvmElement.getPermgenSize() != null || jvmElement.getMaxPermgen() != null) {
      ROOT_LOGGER.ignoringPermGen(type, jvmElement.getName());
    }
  }
}
origin: org.jboss.as/jboss-as-host-controller

  @Override
  void addPermGen(JvmElement jvmElement, List<String> command) {
    String permgen = jvmElement.getPermgenSize();
    String maxPermgen = jvmElement.getMaxPermgen();
    if (maxPermgen == null && permgen != null) {
      maxPermgen = permgen;
    }
    if (permgen == null && maxPermgen != null) {
      permgen = maxPermgen;
    }
    if (permgen != null) {
      command.add("-XX:PermSize=" + permgen);
    }
    if (maxPermgen != null) {
      command.add("-XX:MaxPermSize=" + maxPermgen);
    }
  }
}
origin: org.jboss.as/jboss-as-host-controller

protected JvmResourceDefinition(boolean server) {
  super(PathElement.pathElement(ModelDescriptionConstants.JVM),
      new StandardResourceDescriptionResolver("jvm", HostEnvironmentResourceDefinition.class.getPackage().getName() + ".LocalDescriptions", HostEnvironmentResourceDefinition.class.getClassLoader(), true, false),
      new JVMAddHandler(JvmAttributes.getAttributes(server)),
      JVMRemoveHandler.INSTANCE);
  this.server = server;
}
origin: org.wildfly.core/wildfly-host-controller

@Override
public void registerAttributes(ManagementResourceRegistration resourceRegistration) {
  AttributeDefinition[] defs = JvmAttributes.getAttributes(server);
  OperationStepHandler handler = new ModelOnlyWriteAttributeHandler(defs);
  for (AttributeDefinition attr : JvmAttributes.getAttributes(server)) {
    resourceRegistration.registerReadWriteAttribute(attr, null, handler);
  }
}
origin: org.jboss.as/jboss-as-host-controller

static void registerTransformers120(TransformersSubRegistration parent) {
  TransformersSubRegistration reg = parent.registerSubResource(JvmResourceDefinition.GLOBAL.getPathElement(), ResourceTransformer.DEFAULT);
  RejectExpressionValuesTransformer rejectExpression = new RejectExpressionValuesTransformer(AGENT_PATH, HEAP_SIZE, JAVA_HOME, MAX_HEAP_SIZE,
      PERMGEN_SIZE, MAX_PERMGEN_SIZE,
      STACK_SIZE, OPTIONS, ENVIRONMENT_VARIABLES, ENV_CLASSPATH_IGNORED, AGENT_LIB, JAVA_AGENT);
  reg.registerOperationTransformer(ADD, rejectExpression);
  reg.registerOperationTransformer(WRITE_ATTRIBUTE_OPERATION, rejectExpression.getWriteAttributeTransformer());
}
origin: wildfly/wildfly-core

/** {@inheritDoc} */
@Override
public Map<String, String> getServerLaunchEnvironment() {
  final Map<String, String> env = new HashMap<String, String>();
  for(final Entry<String, String> property : jvmElement.getEnvironmentVariables().entrySet()) {
    env.put(property.getKey(), property.getValue());
  }
  return env;
}
origin: org.jboss.as/jboss-as-host-controller

public void addOptions(JvmElement jvmElement, List<String> command){
  if (jvmElement == null) {
    throw MESSAGES.nullVar("jvm");
  }
  if (command == null) {
    throw MESSAGES.nullVar("command");
  }
  JvmOptionsBuilder builder = BUILDERS.get(jvmElement.getJvmType());
  if (builder == null) {
    throw MESSAGES.unknown("jvm", jvmElement.getJvmType());
  }
  builder.addToOptions(jvmElement, command);
}
origin: org.wildfly.core/wildfly-host-controller

private synchronized JvmType getJvmType(boolean forLaunch) {
  JvmType result = this.jvmType;
  if (result == null) {
    String javaHome = jvmElement.getJavaHome();
    if (javaHome == null) {
      if (environment.getDefaultJVM() != null) {
        String javaExecutable = environment.getDefaultJVM().getAbsolutePath();
        result = JvmType.createFromJavaExecutable(javaExecutable, forLaunch);
      } else {
        result = JvmType.createFromSystemProperty(forLaunch);
      }
    } else {
      result = JvmType.createFromJavaHome(javaHome, forLaunch);
    }
    if (forLaunch) {
      this.jvmType = result;
    } // else don't cache it as we don't know if it's valid and may not add correct default java opts
  }
  return result;
}
origin: org.wildfly.core/wildfly-host-controller

private ArrayList<String> getLaunchPrefixCommands(){
  String launchCommand = jvmElement.getLaunchCommand();
  ArrayList<String> commands = null;
  if(launchCommand.length()>0){
    commands = new ArrayList<String>(Arrays.asList(launchCommand.split("\\s* \\s*")));
  }
  ROOT_LOGGER.serverLaunchCommandPrefix(this.serverName, launchCommand);
  return commands;
}
origin: wildfly/wildfly-core

protected JvmResourceDefinition(boolean server) {
  super(new Parameters(PathElement.pathElement(ModelDescriptionConstants.JVM),
    new StandardResourceDescriptionResolver(ModelDescriptionConstants.JVM, HostEnvironmentResourceDefinition.class.getPackage().getName() + ".LocalDescriptions",
    HostEnvironmentResourceDefinition.class.getClassLoader(), true, false))
    .setAddHandler(new JVMAddHandler(JvmAttributes.getAttributes(server)))
    .setRemoveHandler(JVMRemoveHandler.INSTANCE)
    .setMaxOccurs(server ? 1 : Integer.MAX_VALUE)
    .setMinOccurs(0));
  this.server = server;
}
origin: org.jboss.as/jboss-as-host-controller

@Override
public void registerAttributes(ManagementResourceRegistration resourceRegistration) {
  AttributeDefinition[] defs = JvmAttributes.getAttributes(server);
  OperationStepHandler handler = new ModelOnlyWriteAttributeHandler(defs);
  for (AttributeDefinition attr : JvmAttributes.getAttributes(server)) {
    resourceRegistration.registerReadWriteAttribute(attr, null, handler);
  }
}
origin: wildfly/wildfly-core

  public static void registerTransformers2_1_AndBelow(ResourceTransformationDescriptionBuilder parent) {
    parent.addChildResource(JvmResourceDefinition.GLOBAL.getPathElement())
      .getAttributeBuilder()
      .setDiscard(DiscardAttributeChecker.UNDEFINED, LAUNCH_COMMAND)
      .addRejectCheck(RejectAttributeChecker.DEFINED, LAUNCH_COMMAND)
    .end();
  }
}
origin: org.wildfly.core/wildfly-host-controller

/** {@inheritDoc} */
@Override
public Map<String, String> getServerLaunchEnvironment() {
  final Map<String, String> env = new HashMap<String, String>();
  for(final Entry<String, String> property : jvmElement.getEnvironmentVariables().entrySet()) {
    env.put(property.getKey(), property.getValue());
  }
  return env;
}
origin: wildfly/wildfly-core

public static JvmOptionsBuilderFactory getInstance(final JvmType jvmType) {
  return new JvmOptionsBuilderFactory(jvmType);
}
origin: wildfly/wildfly-core

private ArrayList<String> getLaunchPrefixCommands(){
  String launchCommand = jvmElement.getLaunchCommand();
  ArrayList<String> commands = null;
  if(launchCommand.length()>0){
    commands = new ArrayList<String>(Arrays.asList(launchCommand.split("\\s* \\s*")));
  }
  ROOT_LOGGER.serverLaunchCommandPrefix(this.serverName, launchCommand);
  return commands;
}
origin: org.wildfly.core/wildfly-host-controller

protected JvmResourceDefinition(boolean server) {
  super(new Parameters(PathElement.pathElement(ModelDescriptionConstants.JVM),
    new StandardResourceDescriptionResolver(ModelDescriptionConstants.JVM, HostEnvironmentResourceDefinition.class.getPackage().getName() + ".LocalDescriptions",
    HostEnvironmentResourceDefinition.class.getClassLoader(), true, false))
    .setAddHandler(new JVMAddHandler(JvmAttributes.getAttributes(server)))
    .setRemoveHandler(JVMRemoveHandler.INSTANCE)
    .setMaxOccurs(server ? 1 : Integer.MAX_VALUE)
    .setMinOccurs(0));
  this.server = server;
}
origin: wildfly/wildfly-core

@Override
public void registerAttributes(ManagementResourceRegistration resourceRegistration) {
  AttributeDefinition[] defs = JvmAttributes.getAttributes(server);
  OperationStepHandler handler = new ModelOnlyWriteAttributeHandler(defs);
  for (AttributeDefinition attr : JvmAttributes.getAttributes(server)) {
    resourceRegistration.registerReadWriteAttribute(attr, null, handler);
  }
}
origin: org.wildfly.core/wildfly-host-controller

  public static void registerTransformers2_1_AndBelow(ResourceTransformationDescriptionBuilder parent) {
    parent.addChildResource(JvmResourceDefinition.GLOBAL.getPathElement())
      .getAttributeBuilder()
      .setDiscard(DiscardAttributeChecker.UNDEFINED, LAUNCH_COMMAND)
      .addRejectCheck(RejectAttributeChecker.DEFINED, LAUNCH_COMMAND)
    .end();
  }
}
origin: org.jboss.as/jboss-as-host-controller

/** {@inheritDoc} */
@Override
public Map<String, String> getServerLaunchEnvironment() {
  final Map<String, String> env = new HashMap<String, String>();
  for(final Entry<String, String> property : jvmElement.getEnvironmentVariables().entrySet()) {
    env.put(property.getKey(), property.getValue());
  }
  return env;
}
org.jboss.as.host.controller.model.jvm

Most used classes

  • JVMAddHandler
    OperationHandler for the jvm resource add operation.
  • JvmAttributes
  • JvmElement
    A Java Virtual Machine configuration.
  • JvmOptionsBuilderFactory
  • JvmOptionsElement
    An element representing a list of jvm options.
  • JvmOptionsBuilderFactory$JvmOptionsBuilder
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