com.ace.moab.api.jobs
Class JobBlockReason

java.lang.Object
  extended by com.ace.moab.api.jobs.JobBlockReason
All Implemented Interfaces:
java.lang.Comparable<JobBlockReason>

public class JobBlockReason
extends java.lang.Object
implements java.lang.Comparable<JobBlockReason>

Represents the reason a job might be blocked. The reason consists of the block reason type along with an optional message.

Author:
Scott Brown

Constructor Summary
JobBlockReason(JobBlockReasonType type)
          Creates a JobBlockReason object with the specified type (Required) and an empty message.
JobBlockReason(JobBlockReasonType type, java.lang.String message)
          Creates a JobBlockReason object with the specified type (Required) and the specified message (optional).
 
Method Summary
 int compareTo(JobBlockReason o)
           
 boolean equals(java.lang.Object obj)
           
 java.lang.String getMessage()
          Get the message of the job's block reason.
 JobBlockReasonType getType()
          Get the type of the job's block reason.
static JobBlockReason parseMoabString(java.lang.String blockString)
          Creates a job block reason based on the input string.
 void setMessage(java.lang.String message)
          Sets the message of the job's block reason.
 void setType(JobBlockReasonType type)
          Set the type of the job's block reason.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JobBlockReason

public JobBlockReason(JobBlockReasonType type)
Creates a JobBlockReason object with the specified type (Required) and an empty message.

Parameters:
type - The type of reason why the job is blocked.

JobBlockReason

public JobBlockReason(JobBlockReasonType type,
                      java.lang.String message)
Creates a JobBlockReason object with the specified type (Required) and the specified message (optional).

Parameters:
type - The type of reason why the job is blocked.
message - The message associated with the block message.
Method Detail

parseMoabString

public static JobBlockReason parseMoabString(java.lang.String blockString)
                                      throws java.text.ParseException
Creates a job block reason based on the input string. This input string is of the type {JobBlockReasonType}[:Reason]

Parameters:
blockString - The input string containing the type and the corresponding message
Returns:
A job block reason based on the input text
Throws:
java.text.ParseException - if the type could not be determined.

setMessage

public void setMessage(java.lang.String message)
Sets the message of the job's block reason. Can be null.

Parameters:
message - the message of the job's block reason. Can be null.

getMessage

public java.lang.String getMessage()
Get the message of the job's block reason. Can be null.

Returns:
the message of the job's block reason. Can be null.

setType

public void setType(JobBlockReasonType type)
Set the type of the job's block reason. Cannot be null.

Parameters:
type - the type of the job's block reason. Cannot be null.

getType

public JobBlockReasonType getType()
Get the type of the job's block reason. Cannot be null.

Returns:
the type of the job's block reason. Cannot be null.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

compareTo

public int compareTo(JobBlockReason o)
Specified by:
compareTo in interface java.lang.Comparable<JobBlockReason>

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


Copyright © 2001-2009 Cluster Resources, Inc. All Rights Reserved.