1 // Copyright 2004, 2005 The Apache Software Foundation 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 package org.apache.tapestry.callback; 16 17 import java.io.Serializable; 18 19 import org.apache.tapestry.IRequestCycle; 20 21 /** 22 * Defines a callback, an object which is used to invoke or reinvoke a method 23 * on an object or component in a later request cycle. This is used to 24 * allow certain operations (say, submitting an order) to defer to other processes 25 * (say, logging in and/or registerring). 26 * 27 * <p>Callbacks must be {@link Serializable}, to ensure that they can be stored 28 * between request cycles. 29 * 30 * @author Howard Lewis Ship 31 * @since 0.2.9 32 * 33 **/ 34 35 public interface ICallback extends Serializable 36 { 37 /** 38 * Performs the call back. Typical implementation will locate a particular 39 * page or component and invoke a method upon it, or 40 * invoke a method on the {@link IRequestCycle cycle}. 41 * 42 **/ 43 44 public void performCallback(IRequestCycle cycle); 45 }