|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.apache.avalon.excalibur.util.ComponentStateValidator
This class provides basic facilities for enforcing Avalon's contracts within your own code.
| Constructor Summary | |
ComponentStateValidator(java.lang.Object object)
Create state validator from object (this can be used for more than just components). |
|
| Method Summary | |
void |
checkActive()
Checks to see if the state is active. |
void |
checkActive(java.lang.String message)
Checks to see if the state is active. |
void |
checkComposed()
Throw an exception if the initialization is out of order. |
void |
checkComposed(java.lang.String message)
Throw an exception if the initialization is out of order. |
void |
checkConfigured()
Throw an exception if the initialization is out of order. |
void |
checkConfigured(java.lang.String message)
Throw an exception if the initialization is out of order. |
void |
checkContextualized()
Throw an exception if the initialization is out of order. |
void |
checkContextualized(java.lang.String message)
Throw an exception if the initialization is out of order. |
void |
checkDisposed()
Throw an exception if the initialization is out of order. |
void |
checkDisposed(java.lang.String message)
Throw an exception if the initialization is out of order. |
void |
checkInitialized()
Throw an exception if the initialization is out of order. |
void |
checkInitialized(java.lang.String message)
Throw an exception if the initialization is out of order. |
void |
checkLogEnabled()
Throw an exception if the initialization is out of order. |
void |
checkLogEnabled(java.lang.String message)
Throw an exception if the initialization is out of order. |
void |
checkNotAssigned(java.lang.Object object)
Make sure object has not been assigned yet. |
void |
checkNotAssigned(java.lang.Object object,
java.lang.String message)
Make sure object has not been assigned yet. |
void |
checkParameterized()
Throw an exception if the initialization is out of order. |
void |
checkParameterized(java.lang.String message)
Throw an exception if the initialization is out of order. |
void |
checkResumed()
Throw an exception if the initialization is out of order. |
void |
checkResumed(java.lang.String message)
Throw an exception if the initialization is out of order. |
void |
checkStarted()
Throw an exception if the initialization is out of order. |
void |
checkStarted(java.lang.String message)
Throw an exception if the initialization is out of order. |
void |
checkStopped()
Throw an exception if the initialization is out of order. |
void |
checkStopped(java.lang.String message)
Throw an exception if the initialization is out of order. |
void |
checkSuspended()
Throw an exception if the initialization is out of order. |
void |
checkSuspended(java.lang.String message)
Throw an exception if the initialization is out of order. |
boolean |
isActive()
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 exceptionjava.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 exceptionjava.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 exceptionjava.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 exceptionjava.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 exceptionjava.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 exceptionjava.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 exceptionjava.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 exceptionjava.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 exceptionjava.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 exceptionjava.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 exceptionjava.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 exceptionjava.lang.IllegalStateException - if the component is not activepublic boolean isActive()
public void checkNotAssigned(java.lang.Object object)
object - to testjava.lang.IllegalStateException - if the state is manage out of order
public void checkNotAssigned(java.lang.Object object,
java.lang.String message)
object - to testmessage - the message to include in the thrown exceptionjava.lang.IllegalStateException - if the state is manage out of order
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||