| java.lang.Object com.mockrunner.connector.GenericFailureInteraction
Constructor Summary | |
public | GenericFailureInteraction() Sets the default values, i.e. | public | GenericFailureInteraction(boolean throwException) Sets if failure values should be returned instead of throwing a
ResourceException . | public | GenericFailureInteraction(boolean throwException, ResourceException exception) Sets if failure values should be returned instead of throwing a
ResourceException and allows to set the exception
that will be thrown if exceptions are enabled. |
Method Summary | |
public boolean | canHandle(InteractionSpec interactionSpec, Record actualRequest, Record actualResponse) Returns true if this implementor is enabled and
false otherwise. | public void | disable() Disables this implementor. | public void | enable() Enables this implementor. | public boolean | execute(InteractionSpec interactionSpec, Record actualRequest, Record actualResponse) Throws a ResourceException or returns false . | public Record | execute(InteractionSpec interactionSpec, Record actualRequest) Throws a ResourceException or returns null . | public void | setException(ResourceException exception) Sets the exception that will be thrown if exceptions are enabled. | public void | setThrowException(boolean throwException) Sets if failure values should be returned instead of throwing a
ResourceException . |
GenericFailureInteraction | public GenericFailureInteraction()(Code) | | Sets the default values, i.e. throwing a ResourceException .
|
GenericFailureInteraction | public GenericFailureInteraction(boolean throwException)(Code) | | Sets if failure values should be returned instead of throwing a
ResourceException .
Parameters: throwException - true thrown an exception,false return failure values for execute |
GenericFailureInteraction | public GenericFailureInteraction(boolean throwException, ResourceException exception)(Code) | | Sets if failure values should be returned instead of throwing a
ResourceException and allows to set the exception
that will be thrown if exceptions are enabled.
Parameters: throwException - true thrown an exception,false return failure values for execute Parameters: exception - the exception to be thrown |
canHandle | public boolean canHandle(InteractionSpec interactionSpec, Record actualRequest, Record actualResponse)(Code) | | Returns true if this implementor is enabled and
false otherwise.
|
setException | public void setException(ResourceException exception)(Code) | | Sets the exception that will be thrown if exceptions are enabled.
Parameters: exception - the exception to be thrown |
setThrowException | public void setThrowException(boolean throwException)(Code) | | Sets if failure values should be returned instead of throwing a
ResourceException .
Parameters: throwException - true thrown an exception,false return failure values for execute |
|
|