|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
@Description(value="ExceptionFactory to control exceptions") public interface ExceptionFactoryMBean
The Interface ExceptionFactoryMBean.
| Field Summary | |
|---|---|
static String |
ALL_CLASSES
The default value for setScope(String) if nothing was set. |
| Method Summary | |
|---|---|
void |
activate()
You can only provoke Exceptions if the active flag is set. |
void |
activateOnce()
If you want to provoke an Exception only for the next time use this method. |
void |
deactivate()
You don't want to provoke an exception any longer? |
String |
getFire()
Only exceptions of this returned type will be fired. |
Throwable |
getLastProvoked()
Gets the last provoked exception. |
String |
getLimitedTo()
Deprecated. replaced by getFire() (will be removed with 1.2) |
long |
getMaxNumberOfProvoked()
Gets the max number of provoked exceptions. |
long |
getNumberOfProvoked()
Gets the number of provoked exceptions. |
String |
getScope()
Returns the scope for which the exceptions will be thrown. |
boolean |
isActive()
Checks if is active. |
boolean |
isAssertsEnabled()
To see if the (Sun) Java-VM was called with the option "-ea" ("enable asserts") this getter shows it. |
void |
reset()
Resets all preferences. |
void |
resetFire()
Allows again that all exceptions would be fired. |
void |
resetScope()
To set the scope back to "all classes" use this method here. |
void |
setActive(boolean activ)
You can only provoke Exceptions if the active flag is set. |
void |
setFire(String classname)
You want to provoked an SocketException whenever it is possible? |
void |
setLimitedTo(String limitedTo)
Deprecated. replaced by setFire(String) (will be removed with 1.2) |
void |
setMaxNumberOfProvoked(long n)
Limit the number of provoked maximal total number of provoked exceptions to n. |
void |
setScope(String classname)
To limit the exception to be thrown for a given class you can use this method here. |
| Field Detail |
|---|
static final String ALL_CLASSES
setScope(String) if nothing was set.
| Method Detail |
|---|
boolean isActive()
@Description(value="exceptions can only be provoked it is set to active") void setActive(boolean activ)
activ - true or false@Description(value="Exceptions will be provoked until the deactivate method is called") void activate()
@Description(value="Exceptions will be only provoked once") void activateOnce()
@Description(value="Exceptions will be no longer provoked") void deactivate()
@Description(value="JavaVM started with \'-ea\'?") boolean isAssertsEnabled()
@Description(value="returns the last provoked exception") Throwable getLastProvoked()
@Deprecated @Description(value="only exception of this sub type are thrown") String getLimitedTo()
getFire() (will be removed with 1.2)
@Deprecated
@Description(value="limit the exceptions only to methods which have it in the signature")
void setLimitedTo(String limitedTo)
throws ClassNotFoundException
setFire(String) (will be removed with 1.2)
limitedTo - e.g. "java.io.IOException"
ClassNotFoundException - the class not found exception@Description(value="only exception of this sub type are thrown") String getFire()
@Description(value="fire this exception whenver it is possible")
void setFire(String classname)
throws ClassNotFoundException
classname - e.g. "java.io.IOException"
ClassNotFoundException - if parameter is not a class name@Description(value="enables all exceptions again") void resetFire()
@Description(value="total number of provoked exceptions") long getNumberOfProvoked()
@Description(value="how many exceptions should be provoked?") void setMaxNumberOfProvoked(long n)
n - the maximal number of provoked exceptions
(default is Long.MAX_VALUE)@Description(value="gets the max number of provoked exceptions") long getMaxNumberOfProvoked()
@Description(value="the factory can be registered for a given classname") void setScope(String classname)
classname - for which an exception should be thrown@Description(value="to set the scope back to all classes") void resetScope()
@Description(value="returns the scope for which the exceptions will be thrown") String getScope()
@Description(value="resets all preferences") void reset()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||