Package org.apache.sling.servlethelpers

# Class MockHttpSession

java.lang.Object
org.apache.felix.http.javaxwrappers.HttpSessionWrapper
org.apache.sling.servlethelpers.MockHttpSession

All Implemented Interfaces:
  `javax.servlet.http.HttpSession`

@ConsumerType @Deprecated(since="2.0.0") public class MockHttpSession extends org.apache.felix.http.javaxwrappers.HttpSessionWrapper
Deprecated.
Use `MockJakartaHttpSession` instead.
Mock `HttpSession` implementation.

## Constructor Summary

Constructors
Constructor
Description
`MockHttpSession(MockJakartaHttpSession wrappedSession)`
Deprecated.

## Method Summary

Modifier and Type
Method
Description
`javax.servlet.ServletContext`
`getServletContext()`
Deprecated.
`boolean`
`isInvalidated()`
Deprecated.
`protected MockServletContext`
`newMockServletContext()`
Deprecated.
`void`
`setNew(boolean isNew)`
Deprecated.

### Methods inherited from class org.apache.felix.http.javaxwrappers.HttpSessionWrapper

`getAttribute, getAttributeNames, getCreationTime, getId, getLastAccessedTime, getMaxInactiveInterval, getSessionContext, getValue, getValueNames, invalidate, isNew, putValue, removeAttribute, removeValue, setAttribute, setMaxInactiveInterval`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### MockHttpSession

public MockHttpSession(MockJakartaHttpSession wrappedSession)
Deprecated.

## Method Details

### newMockServletContext

protected MockServletContext newMockServletContext()
Deprecated.

### getServletContext

public javax.servlet.ServletContext getServletContext()
Deprecated.

Specified by:
  `getServletContext` in interface `javax.servlet.http.HttpSession`
Overrides:
  `getServletContext` in class `org.apache.felix.http.javaxwrappers.HttpSessionWrapper`

### isInvalidated

public boolean isInvalidated()
Deprecated.

### setNew

public void setNew(boolean isNew)
Deprecated.