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.http2.markup.head; 018 019import javax.servlet.http.HttpServletRequest; 020 021import org.slf4j.Logger; 022import org.slf4j.LoggerFactory; 023 024/** 025 * The noop push builder is used to inform the dev to place in a vendor specific jar to support the 026 * push builder API 027 * 028 * @author Martin Grigorov 029 * 030 */ 031public class NoopPushBuilder implements PushBuilder 032{ 033 private static final Logger LOG = LoggerFactory.getLogger(NoopPushBuilder.class); 034 035 /** 036 * An instance of the push builder 037 */ 038 public static final NoopPushBuilder INSTANCE = new NoopPushBuilder(); 039 040 /** 041 * Creates the noop push builder 042 */ 043 private NoopPushBuilder() 044 { 045 // NOOP 046 } 047 048 /** 049 * Warns the dev to provide a vendor specific push builder API. 050 * <p> 051 * {@inheritDoc} 052 * </p> 053 */ 054 @Override 055 public void push(HttpServletRequest httpServletRequest, PushItem... pushItems) 056 { 057 LOG.warn( 058 "This PushBuilder does nothing. Please use one of the other implementations - Jetty9 or Tomcat8.5+"); 059 } 060}