# Class MessageInfoImpl

java.lang.Object
org.apache.catalina.authenticator.jaspic.MessageInfoImpl

All Implemented Interfaces:
  `MessageInfo`

public class MessageInfoImpl extends Object implements MessageInfo
Implementation of MessageInfo for JASPIC authentication.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`IS_MANDATORY`
Key for the mandatory flag.
`protected static final StringManager`
`sm`
The string manager for this class.

## Constructor Summary

Constructors
Constructor
Description
`MessageInfoImpl()`
Default constructor.
`MessageInfoImpl(HttpServletRequest request, HttpServletResponse response, boolean authMandatory)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`Map<String,Object>`
`getMap()`
Returns a map of additional context information associated with this authentication exchange.
`Object`
`getRequestMessage()`
Returns the request message object associated with this authentication exchange.
`Object`
`getResponseMessage()`
Returns the response message object associated with this authentication exchange.
`void`
`setRequestMessage(Object request)`
Sets the request message object for this authentication exchange.
`void`
`setResponseMessage(Object response)`
Sets the response message object for this authentication exchange.

### Methods inherited from class Object

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

## Field Details

### sm

protected static final StringManager sm
The string manager for this class.

### IS_MANDATORY

public static final String IS_MANDATORY
Key for the mandatory flag.

See Also:
  - Constant Field Values

## Constructor Details

### MessageInfoImpl

public MessageInfoImpl()
Default constructor.

### MessageInfoImpl

public MessageInfoImpl(HttpServletRequest request, HttpServletResponse response, boolean authMandatory)
Constructor.

Parameters:
  `request` - the request
  `response` - the response
  `authMandatory` - whether auth is mandatory

## Method Details

### getMap

public Map<String,Object> getMap()
Description copied from interface: `jakarta.security.auth.message.MessageInfo`
Returns a map of additional context information associated with this authentication exchange. The map may contain protocol-specific attributes such as message headers.

Specified by:
  `getMap` in interface `MessageInfo`
Returns:
  a `Map` of context information, or `null` if not available

### getRequestMessage

public Object getRequestMessage()
Description copied from interface: `jakarta.security.auth.message.MessageInfo`
Returns the request message object associated with this authentication exchange. The type of the returned object is protocol-specific.

Specified by:
  `getRequestMessage` in interface `MessageInfo`
Returns:
  the request message object, or `null` if not available

### getResponseMessage

public Object getResponseMessage()
Description copied from interface: `jakarta.security.auth.message.MessageInfo`
Returns the response message object associated with this authentication exchange. The type of the returned object is protocol-specific.

Specified by:
  `getResponseMessage` in interface `MessageInfo`
Returns:
  the response message object, or `null` if not available

### setRequestMessage

public void setRequestMessage(Object request)
Description copied from interface: `jakarta.security.auth.message.MessageInfo`
Sets the request message object for this authentication exchange.

Specified by:
  `setRequestMessage` in interface `MessageInfo`
Parameters:
  `request` - the request message object

### setResponseMessage

public void setResponseMessage(Object response)
Description copied from interface: `jakarta.security.auth.message.MessageInfo`
Sets the response message object for this authentication exchange.

Specified by:
  `setResponseMessage` in interface `MessageInfo`
Parameters:
  `response` - the response message object