T
- the generice type so that any object can have a statuspublic class StatusObject<T> extends Status
Modifier and Type | Field and Description |
---|---|
private T |
object
the object of whome's status we are concerned with
|
BAD_CONTENT_FIELD, BAD_REPLY_TO_FIELD, EXCEPTION_CAUGHT, SUCCESS, TIMEOUT, UNEXEPCTED_EXCEPTION_CAUGHT, UNKNOWN_ERROR, UNKNOWN_REPLY, UNKNOWN_WARNING
Constructor and Description |
---|
StatusObject()
the default constructor of StatusObject
|
StatusObject(int status,
String explanation)
a constructor that includes additional information
|
StatusObject(int status,
String explanation,
T obj)
a constructor that includes additional information
|
StatusObject(int status,
T obj)
a constructor that includes additional information
|
StatusObject(T obj)
a constructor that includes additional information
|
StatusObject(TokenParser p)
a constructor for a status object of type TokenParser
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsType(Class<?> testClass)
a function to check if the StatusOBject's generic object is an instance of the testClass
|
void |
fromString_extension(TokenParser parser)
To be overridden by subclasses to read any additional information from a string.
|
T |
getObject()
a function that returns the generic object of this status object (might be null if not set)
|
void |
setObject(T obj)
a function that sets the generic object of this status object
|
String |
toString_extension()
To be overridden by subclasses to write out any extended data.
|
clone, codeToString, fromString, fromString, fromString2, getExplanation, getStatusValue, main, setExplanation, setStatus, setStatusValue, toString
private T object
public StatusObject()
public StatusObject(int status, String explanation)
status
- the integer status we want to set toexplanation
- the explanation of the statuspublic StatusObject(int status, T obj)
status
- the integer status we want to set toobj
- the object who's status we are concerned withpublic StatusObject(int status, String explanation, T obj)
status
- the integer status we want to set toexplanation
- the explanation of the statusobj
- the object who's status we are concerned withpublic StatusObject(T obj)
obj
- the object who's status we are concerned withpublic StatusObject(TokenParser p) throws Exception
p
- the token parser to supplyException
- see TokenParser for informationpublic T getObject()
public void setObject(T obj)
obj
- the generic object to set topublic boolean containsType(Class<?> testClass)
testClass
- the testClass to see if the generic object is an instance there-ofpublic String toString_extension()
Status
toString_extension
in class Status
public void fromString_extension(TokenParser parser) throws Exception
Status
fromString_extension
in class Status
ParseException
Exception