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 javax.servlet.http; 018 019import java.util.Enumeration; 020 021import jakarta.servlet.ServletContext; 022 023/** 024 * A temporary class used until all dependencies provide releases based on jakarta.** APIs 025 */ 026public interface HttpSession extends jakarta.servlet.http.HttpSession { 027 028 class Impl implements javax.servlet.http.HttpSession { 029 030 private final jakarta.servlet.http.HttpSession delegate; 031 032 public Impl(jakarta.servlet.http.HttpSession delegate) 033 { 034 this.delegate = delegate; 035 } 036 037 @Override 038 public jakarta.servlet.http.HttpSession getDelegate() { 039 return delegate; 040 } 041 } 042 043 jakarta.servlet.http.HttpSession getDelegate(); 044 045 @Override 046 default long getCreationTime() { 047 return getDelegate().getCreationTime(); 048 } 049 050 @Override 051 default String getId() { 052 return getDelegate().getId(); 053 } 054 055 @Override 056 default long getLastAccessedTime() { 057 return getDelegate().getLastAccessedTime(); 058 } 059 060 @Override 061 default ServletContext getServletContext() { 062 return getDelegate().getServletContext(); 063 } 064 065 @Override 066 default void setMaxInactiveInterval(int interval) { 067 getDelegate().setMaxInactiveInterval(interval); 068 } 069 070 @Override 071 default int getMaxInactiveInterval() { 072 return getDelegate().getMaxInactiveInterval(); 073 } 074 075 @Override 076 default Object getAttribute(String name) { 077 return getDelegate().getAttribute(name); 078 } 079 080 @Override 081 default Enumeration<String> getAttributeNames() { 082 return getDelegate().getAttributeNames(); 083 } 084 085 @Override 086 default void setAttribute(String name, Object value) { 087 getDelegate().setAttribute(name, value); 088 } 089 090 @Override 091 default void removeAttribute(String name) { 092 getDelegate().removeAttribute(name); 093 } 094 095 @Override 096 default void invalidate() { 097 getDelegate().invalidate(); 098 } 099 100 @Override 101 default boolean isNew() { 102 return getDelegate().isNew(); 103 } 104}