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
005//     http://www.apache.org/licenses/LICENSE-2.0
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.
013package org.apache.tapestry5.runtime;
015import org.apache.tapestry5.MarkupWriter;
018 * A command used during rendering of a page.
019 */
020public interface RenderCommand
022    /**
023     * Invoked on an object to request that it render itself. This involves a mix of invoking methods on the writer, and
024     * queueing up additional commands (often, representing children of the object that was invoked) to perform
025     * additional rendering.
026     *
027     * In this way, rendering is a tail recursive algorithm, but is not implemented using tail recursion.
028     */
029    void render(MarkupWriter writer, RenderQueue queue);