Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
  * JBoss, Home of Professional Open Source.
  * Copyright 2011, Red Hat Middleware LLC, and individual contributors
  * as indicated by the @author tags. See the copyright.txt file in the
  * distribution for a full listing of individual contributors.
  *
  * This is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as
  * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 */
 package org.jboss.as.host.controller.model.jvm;
 
 import java.util.List;
 

Author(s):
Kabir Khan
 
 public class JvmAttributes {
 
     public static final String JVM_AGENT_LIB = "agent-lib";
     public static final String JVM_AGENT_PATH = "agent-path";
     public static final String JVM_DEBUG_ENABLED = "debug-enabled";
     public static final String JVM_DEBUG_OPTIONS = "debug-options";
     public static final String JVM_ENV_CLASSPATH_IGNORED = "env-classpath-ignored";
     public static final String JVM_ENV_VARIABLES = "environment-variables";
     public static final String JVM_HEAP = "heap-size";
     public static final String JVM_MAX_HEAP = "max-heap-size";
     public static final String JVM_JAVA_AGENT = "java-agent";
     public static final String JVM_JAVA_HOME = "java-home";
     public static final String JVM_OPTIONS = "jvm-options";
     public static final String JVM_OPTION = "jvm-option";
     public static final String JVM_PERMGEN = "permgen-size";
     public static final String JVM_MAX_PERMGEN = "max-permgen-size";
     public static final String JVM_STACK = "stack-size";
     public static final String JVM_TYPE = "type";
     public static final String SIZE = "size";
     public static final String VALUE = "value";
     public static final String MAX_SIZE = "max-size";
 
 
     public static final SimpleAttributeDefinition AGENT_LIB =
             SimpleAttributeDefinitionBuilder.create(..true)
             .setAllowExpression(true)
             .setXmlName(.)
             .build();
     public static final SimpleAttributeDefinition AGENT_PATH =
             SimpleAttributeDefinitionBuilder.create(..true)
             .setAllowExpression(true)
             .setXmlName(.)
             .build();
     public static final SimpleAttributeDefinition ENV_CLASSPATH_IGNORED =
             SimpleAttributeDefinitionBuilder.create(..true)
             .setAllowExpression(true)
             .build();
 
             .setXmlName(..getLocalName())
             .setAllowNull(true)
             .setAllowExpression(true)
             .setValidator(new StringLengthValidator(1, truetrue))
             .build();
 
     public static final SimpleAttributeDefinition JAVA_AGENT =
             SimpleAttributeDefinitionBuilder.create(..true)
             .setAllowExpression(true)
             .setXmlName(.)
            .build();
    public static final SimpleAttributeDefinition JAVA_HOME =
            SimpleAttributeDefinitionBuilder.create(..true)
            .setAllowExpression(true)
            .build();

    
JVM options are resolved in ManagedServerBootCmdFactory before the JVM is launched.
            .setValidator(new StringLengthValidator(1, truetrue))
            .setAllowNull(true)
            .setAllowExpression(true)
            .setAttributeMarshaller(new AttributeMarshaller() {
                @Override
                public void marshallAsElement(AttributeDefinition attributeModelNode resourceModelboolean marshallDefaultXMLStreamWriter writerthrows XMLStreamException {
                    if (resourceModel.hasDefined(attribute.getName())) {
                        List<ModelNodelist = resourceModel.get(attribute.getName()).asList();
                        if (list.size() > 0) {
                            writer.writeStartElement(attribute.getName());
                            for (ModelNode child : list) {
                                writer.writeEmptyElement(..getLocalName());
                                writer.writeAttribute(.child.asString());
                            }
                            writer.writeEndElement();
                        }
                    }
                }
            })
            .build();
    public static final SimpleAttributeDefinition STACK_SIZE =
            SimpleAttributeDefinitionBuilder.create(..true)
            .setAllowExpression(true)
            .setXmlName(.)
            .build();
    public static final SimpleAttributeDefinition TYPE =
            SimpleAttributeDefinitionBuilder.create(..true)
            .setAllowExpression(true)
            .setValidator(new EnumValidator<JvmType>(JvmType.classtruetrue))
            .build();
    public static final SimpleAttributeDefinition HEAP_SIZE =
            SimpleAttributeDefinitionBuilder.create(..true)
            .setAllowExpression(true)
            .setXmlName(.)
            .build();
    public static final SimpleAttributeDefinition MAX_HEAP_SIZE =
            SimpleAttributeDefinitionBuilder.create(..true)
            .setAllowExpression(true)
            .setXmlName(.)
            .build();
    public static final SimpleAttributeDefinition PERMGEN_SIZE =
            SimpleAttributeDefinitionBuilder.create(..true)
            .setAllowExpression(true)
            .setXmlName(.)
            .build();
    public static final SimpleAttributeDefinition MAX_PERMGEN_SIZE =
            SimpleAttributeDefinitionBuilder.create(..true)
            .setAllowExpression(true)
            .setXmlName(.)
            .build();
    public static final SimpleAttributeDefinition DEBUG_ENABLED =
            SimpleAttributeDefinitionBuilder.create(..true)
            .setAllowExpression(false)
            .build();
    public static final SimpleAttributeDefinition DEBUG_OPTIONS =
            SimpleAttributeDefinitionBuilder.create(..true)
            .setAllowExpression(false)
            .build();
    private static final AttributeDefinition[] GLOBAL_ATTRIBUTES = new AttributeDefinition[] {
    private static final AttributeDefinition[] SERVER_ATTRIBUTES = new AttributeDefinition[] {
        };
    static AttributeDefinition[] getAttributes(boolean server) {
        return server ?  : ;
    }
New to GrepCode? Check out our FAQ X