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.wicket.request; 018 019/** 020 * A request handler is the base entity that is the subject of a request. Different types of request 021 * have different request handlers. For instance a request for a bookmarkable page differs from a 022 * request for a link on a previously rendered page, which in turn differs from a request for a 023 * shared resource. 024 * 025 * @author Eelco Hillenius 026 * @author Matej Knopp 027 */ 028@FunctionalInterface 029public interface IRequestHandler 030{ 031 /** 032 * Generates a response. 033 * 034 * @param requestCycle 035 * the current request cycle 036 */ 037 void respond(IRequestCycle requestCycle); 038 039 /** 040 * This method is called at the end of a request cycle to indicate that processing is done and 041 * that cleaning up of the subject(s) of this target may be done. 042 * 043 * @param requestCycle 044 * the current request cycle 045 */ 046 default void detach(IRequestCycle requestCycle) 047 {} 048}