| Constructor and Description |
|---|
ApplicationContext(javax.servlet.ServletContext context)
Creates a context for this ServletContext.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<String,Object>> |
entrySet() |
Object |
get(Object key) |
Object |
getAttribute(String name)
Gets an attribute value associated with the given name.
|
javax.servlet.ServletContext |
getServletContext()
Gets the ServletContext associated with this ApplicationContext.
|
boolean |
hasAttribute(String name)
Returns true is an attribute exists with this name.
|
boolean |
isEmpty()
The implementation is not efficient as it loops through all
session values to calculate the size.
|
Iterator<String> |
keys()
Return an iterator with all the attribute names in this context.
|
Set<String> |
keySet() |
Object |
put(String key,
Object value) |
void |
putAll(Map<? extends String,? extends Object> t) |
Object |
remove(Object key) |
void |
removeAttribute(String name)
Removes an attribute associated with the given name.
|
void |
reset()
Not supported by an ApplicationContext.
|
void |
setAttribute(String name,
Object value)
Sets an attribute value associated with the given name.
|
int |
size() |
Collection<Object> |
values() |
public ApplicationContext(javax.servlet.ServletContext context)
context - The ServletContextpublic Object getAttribute(String name)
ContextgetAttribute in interface Contextname - The name of the attribute.public void setAttribute(String name, Object value)
ContextsetAttribute in interface Contextname - The name of the attribute.value - The value of the attribute.public void removeAttribute(String name)
ContextremoveAttribute in interface Contextname - The name of the attribute.public void reset()
public javax.servlet.ServletContext getServletContext()
public boolean hasAttribute(String name)
ContexthasAttribute in interface Contextname - The name of the attribute.public Iterator<String> keys()
Contextpublic boolean isEmpty()
public boolean containsKey(Object key)
containsKey in interface Map<String,Object>public boolean containsValue(Object value)
containsValue in interface Map<String,Object>Copyright © 2015. All Rights Reserved.