001 // Copyright 2006 The Apache Software Foundation002 //003 // Licensed under the Apache License, Version 2.0 (the "License");004 // you may not use this file except in compliance with the License.005 // You may obtain a copy of the License at006 //007 // http://www.apache.org/licenses/LICENSE-2.0008 //009 // Unless required by applicable law or agreed to in writing, software010 // distributed under the License is distributed on an "AS IS" BASIS,011 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.012 // See the License for the specific language governing permissions and013 // limitations under the License.014015 package org.apache.tapestry5;016017 import java.io.Serializable;018019 /**020 * An action that is associated with a component. This is used in several areas of Tapestry and is primarily an attempt021 * to externalize state for a component so that it can be recorded outside the object.022 * <p/>023 * ComponentActions should be immutable. They are often created during one request and associated with a particular024 * component instance. They are then used in a later request (with an equivalent component instance).025 * <p/>026 * ComponentActions are serializable (they are often serialized into Base64 strings for storage on the client).027 */028 public interface ComponentAction<T> extends Serializable029 {030 /**031 * Passed a component instance, the action should operate upon the instance.032 */033 void execute(T component);034 }