Android Open Source - android-weblogic-monitor Server






From Project

Back to project page android-weblogic-monitor.

License

The source code is released under:

GNU General Public License

If you think the Android project android-weblogic-monitor listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

/*
 * *************************************************************************
 *//from ww w.jav a2s . c  om
 * Copyright (c) 2013 - Jeffrey A. West Designs
 *
 * This code is provided for example purposes only.  Neither Oracle nor
 * Jeffrey A. West assume any responsibility or liability for the consequences
 *  of using this code. If you choose to use this code for any reason,
 * including but not limited to its use as an example you do so at your own
 * risk and without the support of Oracle.
 *
 * This code is provided under the following licenses:
 *  - GNU General Public License (GPL-2.0)
 *
 * **************************************************************************
 */

package com.jeffreyawest.weblogic.entity;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.jeffreyawest.weblogic.entity.enums.ServerHealth;
import com.jeffreyawest.weblogic.entity.enums.ServerState;

/**
 * Created by jeffreyawest on 8/9/13.
 */
public class Server extends WebLogicEntity
{

  @JsonProperty
  protected String name;
  @JsonProperty
  protected ServerState state;
  @JsonProperty
  protected ServerHealth health;

  @JsonProperty
  protected String clusterName;
  @JsonProperty
  protected String currentMachine;
  @JsonProperty
  protected String weblogicVersion;
  @JsonProperty
  protected String javaVersion;
  @JsonProperty
  protected String oSName;
  @JsonProperty
  protected String oSVersion;
  @JsonProperty
  protected double jvmProcessorLoad;

  @JsonProperty
  protected int openSocketsCurrentCount;
  @JsonProperty
  protected int heapSizeCurrent;
  @JsonProperty
  protected int heapSizeMax;
  @JsonProperty
  protected int heapFreeCurrent;

  public double getPercentHeapCurrent()
  {

    return (double) this.getHeapSizeCurrent() / (double) this.getHeapSizeMax();
  }

  public double getPercentHeapUnallocated()
  {

    return 1.0 - (double) this.getHeapSizeCurrent() / (double) this.getHeapSizeMax();
  }

  public double getPercentHeapCurrentUsed()
  {

    return ((double) getHeapSizeCurrent() - (double) getHeapFreeCurrent()) / (double) getHeapSizeMax();
  }

  public double getPercentHeapCurrentFree()
  {

    return (double) getHeapFreeCurrent() / (double) getHeapSizeMax();
  }

  @Override
  public String listViewString()
  {

    return name + " / " + state + " / " + health;
  }

  public String getName()
  {

    return name;
  }

  public ServerState getState()
  {

    return state;
  }

  public ServerHealth getHealth()
  {

    return health;
  }

  public String getClusterName()
  {

    return clusterName;
  }

  public String getCurrentMachine()
  {

    return currentMachine;
  }

  public String getWeblogicVersion()
  {

    return weblogicVersion;
  }

  public String getJavaVersion()
  {

    return javaVersion;
  }

  public String getoSVersion()
  {

    return oSVersion;
  }

  public int getOpenSocketsCurrentCount()
  {

    return openSocketsCurrentCount;
  }

  public int getHeapSizeMax()
  {

    return heapSizeMax;
  }

  public int getHeapSizeFree()
  {

    return heapSizeMax - heapSizeCurrent;
  }

  public int getHeapSizeCurrent()
  {

    return heapSizeCurrent;
  }

  public int getHeapFreeCurrent()
  {

    return heapFreeCurrent;
  }

  public int getHeapUsedCurrent()
  {

    return heapSizeCurrent - heapFreeCurrent;
  }

  public String getoSName()
  {

    return oSName;
  }

  public double getJvmProcessorLoad()
  {

    return jvmProcessorLoad;
  }

  public void setName(String name)
  {

    this.name = name;
  }

  public void setState(ServerState state)
  {

    this.state = state;
  }

  public void setHealth(ServerHealth health)
  {

    this.health = health;
  }

  public void setClusterName(String clusterName)
  {

    this.clusterName = clusterName;
  }

  public void setCurrentMachine(String currentMachine)
  {

    this.currentMachine = currentMachine;
  }

  public void setWeblogicVersion(String weblogicVersion)
  {

    this.weblogicVersion = weblogicVersion;
  }

  public void setJavaVersion(String javaVersion)
  {

    this.javaVersion = javaVersion;
  }

  public void setoSName(String oSName)
  {

    this.oSName = oSName;
  }

  public void setoSVersion(String oSVersion)
  {

    this.oSVersion = oSVersion;
  }

  public void setJvmProcessorLoad(double jvmProcessorLoad)
  {

    this.jvmProcessorLoad = jvmProcessorLoad;
  }

  public void setOpenSocketsCurrentCount(int openSocketsCurrentCount)
  {

    this.openSocketsCurrentCount = openSocketsCurrentCount;
  }

  public void setHeapSizeCurrent(int heapSizeCurrent)
  {

    this.heapSizeCurrent = heapSizeCurrent;
  }

  public void setHeapSizeMax(int heapSizeMax)
  {

    this.heapSizeMax = heapSizeMax;
  }

  public void setHeapFreeCurrent(int heapFreeCurrent)
  {

    this.heapFreeCurrent = heapFreeCurrent;
  }

  @Override
  public String toString()
  {

    return "Server{" +
        "name='" + name + '\'' +
        ", state='" + state + '\'' +
        ", health='" + health + '\'' +
        ", clusterName='" + clusterName + '\'' +
        ", currentMachine='" + currentMachine + '\'' +
        ", weblogicVersion='" + weblogicVersion + '\'' +
        ", javaVersion='" + javaVersion + '\'' +
        ", oSName='" + oSName + '\'' +
        ", oSVersion='" + oSVersion + '\'' +
        ", jvmProcessorLoad='" + jvmProcessorLoad + '\'' +
        ", openSocketsCurrentCount=" + openSocketsCurrentCount +
        ", heapSizeCurrent=" + heapSizeCurrent +
        ", heapSizeMax=" + heapSizeMax +
        ", heapFreeCurrent=" + heapFreeCurrent +
        '}';
  }
}




Java Source Code List

com.jeffreyawest.http.HTTPAdapterImpl.java
com.jeffreyawest.http.HTTPAdapter.java
com.jeffreyawest.weblogic.entity.ApplicationDatasource.java
com.jeffreyawest.weblogic.entity.ApplicationTargetState.java
com.jeffreyawest.weblogic.entity.Application.java
com.jeffreyawest.weblogic.entity.ClusterServer.java
com.jeffreyawest.weblogic.entity.Cluster.java
com.jeffreyawest.weblogic.entity.DatasourceInstance.java
com.jeffreyawest.weblogic.entity.Datasource.java
com.jeffreyawest.weblogic.entity.MaxThreadsConstraint.java
com.jeffreyawest.weblogic.entity.MinThreadsConstraint.java
com.jeffreyawest.weblogic.entity.RacInstance.java
com.jeffreyawest.weblogic.entity.RequestClass.java
com.jeffreyawest.weblogic.entity.Server.java
com.jeffreyawest.weblogic.entity.WebLogicEntity.java
com.jeffreyawest.weblogic.entity.WorkManager.java
com.jeffreyawest.weblogic.entity.enums.ApplicationHealth.java
com.jeffreyawest.weblogic.entity.enums.ApplicationState.java
com.jeffreyawest.weblogic.entity.enums.ApplicationType.java
com.jeffreyawest.weblogic.entity.enums.DatasourceInstanceState.java
com.jeffreyawest.weblogic.entity.enums.DatasourceType.java
com.jeffreyawest.weblogic.entity.enums.ServerHealth.java
com.jeffreyawest.weblogic.entity.enums.ServerState.java
com.jeffreyawest.weblogic.entity.enums.TargetState.java
com.jeffreyawest.weblogic.monitor.Constants.java
com.jeffreyawest.weblogic.monitor.WebLogicMonitor.java
com.jeffreyawest.weblogic.monitor.activity.EndpointEntryActivity.java
com.jeffreyawest.weblogic.monitor.activity.MainActivity.java
com.jeffreyawest.weblogic.monitor.activity.display.DisplayApplicationActivity.java
com.jeffreyawest.weblogic.monitor.activity.display.DisplayClusterActivity.java
com.jeffreyawest.weblogic.monitor.activity.display.DisplayDatasourceActivity.java
com.jeffreyawest.weblogic.monitor.activity.display.DisplayEntityActivity.java
com.jeffreyawest.weblogic.monitor.activity.display.DisplayServerActivity.java
com.jeffreyawest.weblogic.monitor.activity.display.fragment.ServerDetailsFragment.java
com.jeffreyawest.weblogic.monitor.activity.list.ListApplicationsActivity.java
com.jeffreyawest.weblogic.monitor.activity.list.ListClustersActivity.java
com.jeffreyawest.weblogic.monitor.activity.list.ListDatasourcesActivity.java
com.jeffreyawest.weblogic.monitor.activity.list.ListDomainEntitiesActivity.java
com.jeffreyawest.weblogic.monitor.activity.list.ListEntityActivity.java
com.jeffreyawest.weblogic.monitor.activity.list.ListServersActivity.java
com.jeffreyawest.weblogic.monitor.activity.list.adapter.ApplicationListAdapter.java
com.jeffreyawest.weblogic.monitor.activity.list.adapter.ClusterListAdapter.java
com.jeffreyawest.weblogic.monitor.activity.list.adapter.DatasourceListAdapter.java
com.jeffreyawest.weblogic.monitor.activity.list.adapter.DomainEntityListAdapter.java
com.jeffreyawest.weblogic.monitor.activity.list.adapter.ServerListAdapter.java
com.jeffreyawest.weblogic.monitor.charting.ApplicationTargetStatePieChart.java
com.jeffreyawest.weblogic.monitor.charting.Charting.java
com.jeffreyawest.weblogic.monitor.charting.ClusterServerHealthPieChart.java
com.jeffreyawest.weblogic.monitor.charting.ClusterServerStatePieChart.java
com.jeffreyawest.weblogic.monitor.charting.DatasourceInstancePieChart.java
com.jeffreyawest.weblogic.monitor.charting.DefaultPieChart.java
com.jeffreyawest.weblogic.monitor.charting.JVMCPUPieChart.java
com.jeffreyawest.weblogic.monitor.charting.JVMHeapPieChart.java
com.jeffreyawest.weblogic.monitor.task.RetrieveWebLogicEntityTask.java
com.jeffreyawest.weblogic.rest.WebLogicDemoRestAdapter.java
com.jeffreyawest.weblogic.rest.WebLogicHTTPRestAdapter.java
com.jeffreyawest.weblogic.rest.WebLogicRestAdapter.java