|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avalon.excalibur.testcase.ComponentStateValidator
This class provides basic facilities for enforcing Avalon's contracts within your own code. Based on Avalon version from Sandbox.
Constructor Summary | |
ComponentStateValidator(java.lang.Object object)
Deprecated. Create state validator from object (this can be used for more than just components). |
Method Summary | |
void |
checkActive()
Deprecated. Checks to see if the state is active. |
void |
checkActive(java.lang.String message)
Deprecated. Checks to see if the state is active. |
void |
checkComposed()
Deprecated. Throw an exception if the initialization is out of order. |
void |
checkComposed(java.lang.String message)
Deprecated. Throw an exception if the initialization is out of order. |
void |
checkConfigured()
Deprecated. Throw an exception if the initialization is out of order. |
void |
checkConfigured(java.lang.String message)
Deprecated. Throw an exception if the initialization is out of order. |
void |
checkContextualized()
Deprecated. Throw an exception if the initialization is out of order. |
void |
checkContextualized(java.lang.String message)
Deprecated. Throw an exception if the initialization is out of order. |
void |
checkDisposed()
Deprecated. Throw an exception if the initialization is out of order. |
void |
checkDisposed(java.lang.String message)
Deprecated. Throw an exception if the initialization is out of order. |
void |
checkInitialized()
Deprecated. Throw an exception if the initialization is out of order. |
void |
checkInitialized(java.lang.String message)
Deprecated. Throw an exception if the initialization is out of order. |
void |
checkLogEnabled()
Deprecated. Throw an exception if the initialization is out of order. |
void |
checkLogEnabled(java.lang.String message)
Deprecated. Throw an exception if the initialization is out of order. |
void |
checkLoggable()
Deprecated. Throw an exception if the initialization is out of order. |
void |
checkLoggable(java.lang.String message)
Deprecated. Throw an exception if the initialization is out of order. |
void |
checkNotAssigned(java.lang.Object object)
Deprecated. Make sure object has not been assigned yet. |
void |
checkNotAssigned(java.lang.Object object,
java.lang.String message)
Deprecated. Make sure object has not been assigned yet. |
void |
checkParameterized()
Deprecated. Throw an exception if the initialization is out of order. |
void |
checkParameterized(java.lang.String message)
Deprecated. Throw an exception if the initialization is out of order. |
void |
checkResumed()
Deprecated. Throw an exception if the initialization is out of order. |
void |
checkResumed(java.lang.String message)
Deprecated. Throw an exception if the initialization is out of order. |
void |
checkServiced()
Deprecated. Throw an exception if the initialization is out of order. |
void |
checkServiced(java.lang.String message)
Deprecated. Throw an exception if the initialization is out of order. |
void |
checkStarted()
Deprecated. Throw an exception if the initialization is out of order. |
void |
checkStarted(java.lang.String message)
Deprecated. Throw an exception if the initialization is out of order. |
void |
checkStopped()
Deprecated. Throw an exception if the initialization is out of order. |
void |
checkStopped(java.lang.String message)
Deprecated. Throw an exception if the initialization is out of order. |
void |
checkSuspended()
Deprecated. Throw an exception if the initialization is out of order. |
void |
checkSuspended(java.lang.String message)
Deprecated. Throw an exception if the initialization is out of order. |
boolean |
isActive()
Deprecated. Checks to see if the state is active, and returns true or false. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ComponentStateValidator(java.lang.Object object)
Method Detail |
public void checkLogEnabled()
java.lang.IllegalStateException
- if the state is manage out of orderpublic void checkLogEnabled(java.lang.String message)
message
- the message to include in the thrown exception
java.lang.IllegalStateException
- if the state is manage out of orderpublic void checkLoggable()
java.lang.IllegalStateException
- if the state is manage out of orderpublic void checkLoggable(java.lang.String message)
message
- the message to include in the thrown exception
java.lang.IllegalStateException
- if the state is manage out of orderpublic void checkContextualized()
java.lang.IllegalStateException
- if the state is manage out of orderpublic void checkContextualized(java.lang.String message)
message
- the message to include in the thrown exception
java.lang.IllegalStateException
- if the state is manage out of orderpublic void checkServiced()
java.lang.IllegalStateException
- if the state is manage out of orderpublic void checkServiced(java.lang.String message)
message
- the message to include in the thrown exception
java.lang.IllegalStateException
- if the state is manage out of orderpublic void checkComposed()
java.lang.IllegalStateException
- if the state is manage out of orderpublic void checkComposed(java.lang.String message)
message
- the message to include in the thrown exception
java.lang.IllegalStateException
- if the state is manage out of orderpublic void checkConfigured()
java.lang.IllegalStateException
- if the state is manage out of orderpublic void checkConfigured(java.lang.String message)
message
- the message to include in the thrown exception
java.lang.IllegalStateException
- if the state is manage out of orderpublic void checkParameterized()
java.lang.IllegalStateException
- if the state is manage out of orderpublic void checkParameterized(java.lang.String message)
message
- the message to include in the thrown exception
java.lang.IllegalStateException
- if the state is manage out of orderpublic void checkInitialized()
initialize
stage.
java.lang.IllegalStateException
- if the state is manage out of orderpublic void checkInitialized(java.lang.String message)
initialize
stage.
message
- the message to include in the thrown exception
java.lang.IllegalStateException
- if the state is manage out of orderpublic void checkStarted()
start
stage.
java.lang.IllegalStateException
- if the state is manage out of orderpublic void checkStarted(java.lang.String message)
start
stage.
message
- the message to include in the thrown exception
java.lang.IllegalStateException
- if the state is manage out of orderpublic void checkSuspended()
java.lang.IllegalStateException
- if the state is manage out of orderpublic void checkSuspended(java.lang.String message)
message
- the message to include in the thrown exception
java.lang.IllegalStateException
- if the state is manage out of orderpublic void checkResumed()
java.lang.IllegalStateException
- if the state is manage out of orderpublic void checkResumed(java.lang.String message)
message
- the message to include in the thrown exception
java.lang.IllegalStateException
- if the state is manage out of orderpublic void checkStopped()
java.lang.IllegalStateException
- if the state is manage out of orderpublic void checkStopped(java.lang.String message)
message
- the message to include in the thrown exception
java.lang.IllegalStateException
- if the state is manage out of orderpublic void checkDisposed()
java.lang.IllegalStateException
- if the state is manage out of orderpublic void checkDisposed(java.lang.String message)
message
- the message to include in the thrown exception
java.lang.IllegalStateException
- if the state is manage out of orderpublic void checkActive()
java.lang.IllegalStateException
- if the component is not activepublic void checkActive(java.lang.String message)
message
- the message to include in the thrown exception
java.lang.IllegalStateException
- if the component is not activepublic boolean isActive()
true
if active, false
if notpublic void checkNotAssigned(java.lang.Object object)
object
- to test
java.lang.IllegalStateException
- if the state is manage out of orderpublic void checkNotAssigned(java.lang.Object object, java.lang.String message)
object
- to testmessage
- the message to include in the thrown exception
java.lang.IllegalStateException
- if the state is manage out of order
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |