/src/main/java/com/atlassian/bamboo/plugins/tomcat/manager/Application.java
Java | 63 lines | 43 code | 12 blank | 8 comment | 0 complexity | 30fc39988919ecac74c332633e7802ab MD5 | raw file
Possible License(s): Apache-2.0
- package com.atlassian.bamboo.plugins.tomcat.manager;
- import org.apache.log4j.Logger;
- public final class Application
- {
- private static final Logger log = Logger.getLogger(Application.class);
- // ------------------------------------------------------------------------------------------------------- Constants
- // ------------------------------------------------------------------------------------------------- Type Properties
- private final String context;
- private final ApplicationState applicationState;
- private final int activeSessions;
- private final String name;
- // ---------------------------------------------------------------------------------------------------- Dependencies
- // ---------------------------------------------------------------------------------------------------- Constructors
- public Application(final String context, final String applicationState, final String activeSessions, final String name)
- {
- this.context = context;
- this.applicationState = ApplicationState.valueOf(applicationState.toUpperCase());
- this.activeSessions = Integer.parseInt(activeSessions);
- this.name = name;
- }
- // ----------------------------------------------------------------------------------------------- Interface Methods
- // -------------------------------------------------------------------------------------------------- Action Methods
- // -------------------------------------------------------------------------------------------------- Public Methods
- public String getContext()
- {
- return context;
- }
- public ApplicationState getApplicationState()
- {
- return applicationState;
- }
- public int getActiveSessions()
- {
- return activeSessions;
- }
- public String getName()
- {
- return name;
- }
- // -------------------------------------------------------------------------------------- Basic Accessors / Mutators
- @Override
- public String toString()
- {
- return "Application{" +
- "context='" + context + '\'' +
- ", applicationState=" + applicationState +
- ", activeSessions=" + activeSessions +
- ", name='" + name + '\'' +
- '}';
- }
- }