PageRenderTime 43ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/jboss-as-7.1.1.Final/host-controller/src/test/java/org/jboss/as/host/controller/JvmElementTestUtils.java

#
Java | 81 lines | 41 code | 14 blank | 26 comment | 0 complexity | 3389ad168c167b1164eed657d13bc7eb MD5 | raw file
Possible License(s): LGPL-2.1, Apache-2.0
  1. /*
  2. * JBoss, Home of Professional Open Source.
  3. * Copyright 2010, Red Hat, Inc., and individual contributors
  4. * as indicated by the @author tags. See the copyright.txt file in the
  5. * distribution for a full listing of individual contributors.
  6. *
  7. * This is free software; you can redistribute it and/or modify it
  8. * under the terms of the GNU Lesser General Public License as
  9. * published by the Free Software Foundation; either version 2.1 of
  10. * the License, or (at your option) any later version.
  11. *
  12. * This software is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * Lesser General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Lesser General Public
  18. * License along with this software; if not, write to the Free
  19. * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  20. * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  21. */
  22. package org.jboss.as.host.controller;
  23. /**
  24. *
  25. * @author <a href="kabir.khan@jboss.com">Kabir Khan</a>
  26. * @version $Revision: 1.1 $
  27. */
  28. public class JvmElementTestUtils {
  29. public static JvmElement create(JvmType type) {
  30. JvmElement element = new JvmElement("test");
  31. element.setJvmType(type);
  32. return element;
  33. }
  34. public static void setDebugEnabled(JvmElement element, boolean value) {
  35. element.setDebugEnabled(value);
  36. }
  37. public static void setDebugOptions(JvmElement element, String value) {
  38. element.setDebugOptions(value);
  39. }
  40. public static void setHeapSize(JvmElement element, String value) {
  41. element.setHeapSize(value);
  42. }
  43. public static void setMaxHeap(JvmElement element, String value) {
  44. element.setMaxHeap(value);
  45. }
  46. public static void setPermgenSize(JvmElement element, String value) {
  47. element.setPermgenSize(value);
  48. }
  49. public static void setMaxPermgen(JvmElement element, String value) {
  50. element.setMaxPermgen(value);
  51. }
  52. public static void setStack(JvmElement element, String value) {
  53. element.setStack(value);
  54. }
  55. public static void setAgentLib(JvmElement element, String value) {
  56. element.setAgentLib(value);
  57. }
  58. public static void setAgentPath(JvmElement element, String value) {
  59. element.setAgentPath(value);
  60. }
  61. public static void setJavaagent(JvmElement element, String value) {
  62. element.setJavaagent(value);
  63. }
  64. public static void addJvmOption(JvmElement element, String value) {
  65. element.getJvmOptions().addOption(value);
  66. }
  67. }