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

/src/main/java/com/atlassian/bamboo/plugins/tomcat/manager/Application.java

https://bitbucket.org/atlassian/bamboo-tomcat-plugin/
Java | 63 lines | 43 code | 12 blank | 8 comment | 0 complexity | 30fc39988919ecac74c332633e7802ab MD5 | raw file
Possible License(s): Apache-2.0
  1. package com.atlassian.bamboo.plugins.tomcat.manager;
  2. import org.apache.log4j.Logger;
  3. public final class Application
  4. {
  5. private static final Logger log = Logger.getLogger(Application.class);
  6. // ------------------------------------------------------------------------------------------------------- Constants
  7. // ------------------------------------------------------------------------------------------------- Type Properties
  8. private final String context;
  9. private final ApplicationState applicationState;
  10. private final int activeSessions;
  11. private final String name;
  12. // ---------------------------------------------------------------------------------------------------- Dependencies
  13. // ---------------------------------------------------------------------------------------------------- Constructors
  14. public Application(final String context, final String applicationState, final String activeSessions, final String name)
  15. {
  16. this.context = context;
  17. this.applicationState = ApplicationState.valueOf(applicationState.toUpperCase());
  18. this.activeSessions = Integer.parseInt(activeSessions);
  19. this.name = name;
  20. }
  21. // ----------------------------------------------------------------------------------------------- Interface Methods
  22. // -------------------------------------------------------------------------------------------------- Action Methods
  23. // -------------------------------------------------------------------------------------------------- Public Methods
  24. public String getContext()
  25. {
  26. return context;
  27. }
  28. public ApplicationState getApplicationState()
  29. {
  30. return applicationState;
  31. }
  32. public int getActiveSessions()
  33. {
  34. return activeSessions;
  35. }
  36. public String getName()
  37. {
  38. return name;
  39. }
  40. // -------------------------------------------------------------------------------------- Basic Accessors / Mutators
  41. @Override
  42. public String toString()
  43. {
  44. return "Application{" +
  45. "context='" + context + '\'' +
  46. ", applicationState=" + applicationState +
  47. ", activeSessions=" + activeSessions +
  48. ", name='" + name + '\'' +
  49. '}';
  50. }
  51. }