001// Licensed under the Apache License, Version 2.0 (the "License"); 002// you may not use this file except in compliance with the License. 003// You may obtain a copy of the License at 004// 005// http://www.apache.org/licenses/LICENSE-2.0 006// 007// Unless required by applicable law or agreed to in writing, software 008// distributed under the License is distributed on an "AS IS" BASIS, 009// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 010// See the License for the specific language governing permissions and 011// limitations under the License. 012 013package org.apache.tapestry5; 014 015import org.apache.tapestry5.annotations.Environmental; 016import org.apache.tapestry5.services.ComponentEventResultProcessor; 017import org.apache.tapestry5.services.Traditional; 018 019import java.io.IOException; 020 021/** 022 * Extends {@link ComponentEventCallback} with a way to determine if the underlying event has been aborted 023 * due to a some event returning an acceptable, non-null value. The standard implementation of this 024 * is a wrapper around either the {@linkplain Traditional traditional} or 025 * {@linkplain org.apache.tapestry5.services.Ajax ajax} versions of the {@link ComponentEventResultProcessor} 026 * service, i.e., they allow for a navigational result. 027 * 028 * Instances of this are made available via the {@link Environmental} annotation. 029 * 030 * @since 5.2.0 031 */ 032public interface TrackableComponentEventCallback<T> extends ComponentEventCallback<T> 033{ 034 /** 035 * Returns true if a return value from an event handler method was processed. 036 */ 037 boolean isAborted(); 038 039 /** 040 * If processing a return value threw an IOException, invoking this method will rethrow it. 041 */ 042 void rethrow() throws IOException; 043}