Package org.rhq.core.domain.measurement

Examples of org.rhq.core.domain.measurement.AvailabilityType


            log.debug("About to execute the following process: [" + processExecution + "]");
        }
        ProcessExecutionResults results = this.systemInfo.executeProcess(processExecution);
        logExecutionResults(results);

        AvailabilityType avail;
        if (results.getError() == null) {
            avail = waitForServerToStart(start);
        } else {
            log.error("Error from process execution while starting the AS instance. Exit code ["
                + results.getExitCode() + "]", results.getError());
View Full Code Here


    private String shutdown() throws InterruptedException {
        JBossASServerShutdownMethod shutdownMethod = Enum.valueOf(JBossASServerShutdownMethod.class,
            this.serverComponent.getPluginConfiguration().getSimple(JBossASServerComponent.SHUTDOWN_METHOD_CONFIG_PROP)
                .getStringValue());
        String result = JBossASServerShutdownMethod.JMX.equals(shutdownMethod) ? shutdownViaJmx() : shutdownViaScript();
        AvailabilityType avail = waitForServerToShutdown();
        if (avail == AvailabilityType.UP) {
            throw new RuntimeException("Server failed to shutdown");
        } else {
            return result;
        }
View Full Code Here

        return "Server has been restarted.";

    }

    private AvailabilityType waitForServerToStart(long start) throws InterruptedException {
        AvailabilityType avail;
        //detect whether startWaitMax property has been set.
        Configuration pluginConfig = serverComponent.getPluginConfiguration();
        PropertySimple property = pluginConfig.getSimple(JBossASServerComponent.START_WAIT_MAX_PROP);
        //if set and valid, update startWaitMax value
        if ((property != null) && (property.getIntegerValue() != null)) {
View Full Code Here

   */
  public AvailabilityType getAvailability() {
    // TODO: here you normally make some type of connection attempt to the
    // managed resource
    // to determine if it is really up and running.
    AvailabilityType status = AvailabilityType.UP;
    try {
      Object obj = beanServerConnection.invoke(blacktieAdmin,
          "getDomainStatus", null, null);
      if ((Boolean) obj) {
        status = AvailabilityType.DOWN;
View Full Code Here

   * and available.
   *
   * @see ResourceComponent#getAvailability()
   */
  public AvailabilityType getAvailability() {
    AvailabilityType status = AvailabilityType.DOWN;

    try {
      log.trace(serviceName);
      boolean conversational = false;
      if (!serviceName.startsWith(".")) {
View Full Code Here

     * @return UP, DOWN or UNKNOWN
     */
    public String getAvailableStatus(Resource resource)
    {
        Availability availability = getManager().getAvailability(resource);
        AvailabilityType type = availability.getAvailabilityType();
        //noinspection UnnecessaryLocalVariable
        String status = (type != null) ? type.getName() : "UNKNOWN";
        return status;
    }
View Full Code Here

TOP

Related Classes of org.rhq.core.domain.measurement.AvailabilityType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.