Top Description Fields Constructors Methods
jakarta.servlet

public Class ServletContextAttributeEvent

extends ServletContextEvent
Class Inheritance

Event class for notifications about changes to the attributes of the ServletContext of a web application.
Since
Servlet 2.3
See Also
ServletContextAttributeListener

Field Summary

Modifier and TypeField and Description
private final String
private static final long
private final Object

Constructor Summary

AccessConstructor and Description
public
ServletContextAttributeEvent(ServletContext
the ServletContext whose attribute changed
source
,
String
the name of the ServletContext attribute that changed
name
,
Object
the value of the ServletContext attribute that changed
value
)

Constructs a ServletContextAttributeEvent from the given ServletContext, attribute name, and attribute value.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the name of the ServletContext attribute that changed
getName
()

Gets the name of the ServletContext attribute that changed.

public Object

Returns:

the value of the ServletContext attribute that changed
getValue
()

Gets the value of the ServletContext attribute that changed.

Inherited from jakarta.servlet.ServletContextEvent:
getServletContext

Field Detail

nameback to summary
private final String name
serialVersionUIDback to summary
private static final long serialVersionUID

Hides jakarta.servlet.ServletContextEvent.serialVersionUID.

valueback to summary
private final Object value

Constructor Detail

ServletContextAttributeEventback to summary
public ServletContextAttributeEvent(ServletContext source, String name, Object value)

Constructs a ServletContextAttributeEvent from the given ServletContext, attribute name, and attribute value.

Parameters
source:ServletContext

the ServletContext whose attribute changed

name:String

the name of the ServletContext attribute that changed

value:Object

the value of the ServletContext attribute that changed

Method Detail

getNameback to summary
public String getName()

Gets the name of the ServletContext attribute that changed.

Returns:String

the name of the ServletContext attribute that changed

getValueback to summary
public Object getValue()

Gets the value of the ServletContext attribute that changed.

If the attribute was added, this is the value of the attribute. If the attribute was removed, this is the value of the removed attribute. If the attribute was replaced, this is the old value of the attribute.

Returns:Object

the value of the ServletContext attribute that changed