001// *************************************************************************************************************************** 002// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file * 003// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file * 004// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance * 005// * with the License. You may obtain a copy of the License at * 006// * * 007// * http://www.apache.org/licenses/LICENSE-2.0 * 008// * * 009// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an * 010// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * 011// * specific language governing permissions and limitations under the License. * 012// *************************************************************************************************************************** 013package org.apache.juneau.rest.mock; 014 015import java.util.*; 016 017import javax.servlet.*; 018import javax.servlet.http.*; 019 020/** 021 * An implementation of {@link HttpSession} for mocking purposes. 022 * 023 * @deprecated Use <c>org.apache.juneau.rest.mock2</c> 024 */ 025@Deprecated 026public class MockHttpSession implements HttpSession { 027 028 /** 029 * Creates a new HTTP session. 030 * 031 * @return A new HTTP session. 032 */ 033 public static MockHttpSession create() { 034 return new MockHttpSession(); 035 } 036 037 @Override /* HttpSession */ 038 public long getCreationTime() { 039 return 0; 040 } 041 042 @Override /* HttpSession */ 043 public String getId() { 044 return null; 045 } 046 047 @Override /* HttpSession */ 048 public long getLastAccessedTime() { 049 return 0; 050 } 051 052 @Override /* HttpSession */ 053 public ServletContext getServletContext() { 054 return null; 055 } 056 057 @Override /* HttpSession */ 058 public void setMaxInactiveInterval(int interval) { 059 } 060 061 @Override /* HttpSession */ 062 public int getMaxInactiveInterval() { 063 return 0; 064 } 065 066 @Override /* HttpSession */ 067 public HttpSessionContext getSessionContext() { 068 return null; 069 } 070 071 @Override /* HttpSession */ 072 public Object getAttribute(String name) { 073 return null; 074 } 075 076 @Override /* HttpSession */ 077 public Object getValue(String name) { 078 return null; 079 } 080 081 @Override /* HttpSession */ 082 public Enumeration<String> getAttributeNames() { 083 return null; 084 } 085 086 @Override /* HttpSession */ 087 public String[] getValueNames() { 088 return null; 089 } 090 091 @Override /* HttpSession */ 092 public void setAttribute(String name, Object value) { 093 } 094 095 @Override /* HttpSession */ 096 public void putValue(String name, Object value) { 097 } 098 099 @Override /* HttpSession */ 100 public void removeAttribute(String name) { 101 } 102 103 @Override /* HttpSession */ 104 public void removeValue(String name) { 105 } 106 107 @Override /* HttpSession */ 108 public void invalidate() { 109 } 110 111 @Override /* HttpSession */ 112 public boolean isNew() { 113 return false; 114 } 115}