Package org.mokai.Monitorable

Examples of org.mokai.Monitorable.Status


    return state;
  }

  @Override
  public final Status getStatus() {
    Status retStatus = status; // the status we are returning

    // check if the processor is monitorable
    if (Monitorable.class.isInstance(connector)) {
      Monitorable monitorable = (Monitorable) connector;
      retStatus = monitorable.getStatus();
    }

    // resolve conflicts
    if (retStatus.equals(Status.OK) && status.equals(Status.FAILED)) {
      String message = status.getMessage();
      message = "Connector is OK but " + message;

      status.setMessage(message);
View Full Code Here


  public static Status unknown() {
    return Status.UNKNOWN;
  }

  public static Status unknown(String message) {
    Status status = Status.UNKNOWN;
    status.setMessage(message);

    return status;
  }
View Full Code Here

  public static Status ok() {
    return Status.OK;
  }

  public static Status ok(String message) {
    Status status = Status.OK;
    status.setMessage(message);

    return status;
  }
View Full Code Here

    return status;
  }

  public static Status failed(String message) {
    Status status = Status.FAILED;
    status.setMessage(message);

    return status;
  }
View Full Code Here

    return status;
  }

  public static Status failed(String message, Exception exception) {
    Status status = Status.FAILED;
    status.setMessage(message);
    status.setException(exception);

    return status;
  }
View Full Code Here

TOP

Related Classes of org.mokai.Monitorable.Status

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.