org.apache.tapestry5.internal.services
Class ComponentResultProcessorWrapper

java.lang.Object
  extended by org.apache.tapestry5.internal.services.ComponentResultProcessorWrapper
All Implemented Interfaces:
ComponentEventCallback

public class ComponentResultProcessorWrapper
extends Object
implements ComponentEventCallback

A wrapper around ComponentEventResultProcessor that encapsulates capturing the exception.


Constructor Summary
ComponentResultProcessorWrapper(ComponentEventResultProcessor processor)
           
 
Method Summary
 boolean handleResult(Object result)
          Invoked to handle a non-null event handler method result.
 boolean isAborted()
          Returns true if ComponentEventCallback.handleResult(Object) was invoked, false otherwise.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentResultProcessorWrapper

public ComponentResultProcessorWrapper(ComponentEventResultProcessor processor)
Method Detail

handleResult

public boolean handleResult(Object result)
Description copied from interface: ComponentEventCallback
Invoked to handle a non-null event handler method result. The handler should determine whether the value is acceptible, and throw an exception if not. Any thrown exception will be wrapped to identify the component and method from which the value was returned.

Boolean values are not passed to the handler. Booleans are used to indicate that the event has been handled (true) or that a further search for handlers should continue (true). If a component event method returns true, then Event.isAborted() will return true.

Specified by:
handleResult in interface ComponentEventCallback
Parameters:
result - the result value return from the event handler method
Returns:
true if the event is aborted, false if the event may continue

isAborted

public boolean isAborted()
                  throws IOException
Returns true if ComponentEventCallback.handleResult(Object) was invoked, false otherwise.

Returns:
true if the event was aborted
Throws:
IOException - if ComponentEventResultProcessor.processResultValue(Object) threw an IOException


Copyright © 2006-2009 Apache Software Foundation. All Rights Reserved.