001/* 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017package org.apache.juneau.rest.server.view; 018 019import org.apache.juneau.rest.server.processor.*; 020 021/** 022 * Marker interface for response processors that handle {@link View}-typed return values. 023 * 024 * <p> 025 * During {@link ResponseProcessorList} construction, any processor implementing this interface 026 * is automatically repositioned to run before any {@link CatchAllResponseProcessor} in the chain. 027 * This ensures view renderers are consulted before the catch-all serializer for 028 * {@code View}-returning {@code @RestOp} methods. 029 * 030 * <p> 031 * The four built-in renderers automatically implement this interface: 032 * <ul> 033 * <li class='jc'>{@code org.apache.juneau.rest.server.view.jsp.JspViewRenderer} 034 * <li class='jc'>{@code org.apache.juneau.rest.server.view.thymeleaf.ThymeleafViewRenderer} 035 * <li class='jc'>{@code org.apache.juneau.rest.server.view.mustache.MustacheViewRenderer} 036 * <li class='jc'>{@code org.apache.juneau.rest.server.view.freemarker.FreemarkerViewRenderer} 037 * </ul> 038 * 039 * <p> 040 * Third-party view renderers should implement this interface to inherit the same ordering 041 * guarantee. 042 * 043 * <h5 class='section'>See Also:</h5><ul> 044 * <li class='jc'>{@link CatchAllResponseProcessor} 045 * <li class='jc'>{@link ResponseProcessorList} 046 * <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/ResponseProcessors">Response Processors</a> 047 * </ul> 048 * 049 * @since 10.0.0 050 */ 051public interface ViewRenderer extends ResponseProcessor {}