|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.norther.tammi.core.pool.RecyclableSupport org.norther.tammi.core.pool.PoolableSupport org.norther.tammi.spray.engine.context.DefaultTemplateContext
public class DefaultTemplateContext
A default implementation of TemplateContext.
Constructor Summary | |
---|---|
DefaultTemplateContext()
Constructs a new context. |
|
DefaultTemplateContext(TemplateContext ctx)
Constructs a new context with a parent. |
Method Summary | |
---|---|
boolean |
addParent(int index,
TemplateContext context)
Adds a parent context to a specied index. |
boolean |
addParent(TemplateContext context)
Adds a parent context. |
void |
clear()
Clears the context but not its parents. |
void |
clearParents()
Clears all parents from this context. |
boolean |
containsKey(String key)
Checks whether a key is in the context or in its parents. |
void |
dispose()
Disposes the object by setting its disposed flag. |
Object |
get(String key)
Gets an object from the context or from its parents. |
Content |
getContent()
Gets the content of this context. |
ContextToolFilter |
getContextToolFilter()
Gets the context tool filter of this context. |
HttpFilterChain |
getFilterChain()
Gets the filter chain of this context. |
MBeanServer |
getMBeanServer()
Gets the MBean server. |
TemplateContext |
getParent(int index)
Gets the indexed parent from the context. |
List<TemplateContext> |
getParents()
Gets a read-only list of parents. |
Set<String> |
keySet()
Gets a set of all keys in the context and in its parents. |
int |
numberOfParents()
Returns the number of parents. |
Object |
put(String key,
Object value)
Puts an object into the context. |
void |
recycle(TemplateContext ctx)
Recycles a context with a parent. |
Object |
remove(String key)
Removes an object from the context. |
TemplateContext |
removeParent(int index)
Removes an indexed parent context. |
boolean |
removeParent(TemplateContext context)
Removes a parent context. |
void |
set(String key,
Object value)
Sets an object int the context. |
protected void |
setContextToolFilterMBean(MBeanReference<? extends ContextToolFilter> ref)
Sets the context tool filter of this context. |
TemplateContext |
setParent(int index,
TemplateContext context)
Sets a parent context to a specied index. |
int |
size()
Gets the size of the context including its parents. |
void |
valueBound(HttpSessionBindingEvent event)
|
void |
valueBound(ServletRequestBindingEvent event)
Notifies the object that it is being bound to a request. |
Collection<Object> |
values()
Gets a collection of all values in the context and in its parents. |
void |
valueUnbound(HttpSessionBindingEvent event)
|
void |
valueUnbound(ServletRequestBindingEvent event)
Notifies the object that it is being unbound from a request. |
Methods inherited from class org.norther.tammi.core.pool.PoolableSupport |
---|
disposed, recycled |
Methods inherited from class org.norther.tammi.core.pool.RecyclableSupport |
---|
isDisposed, recycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.norther.tammi.core.pool.Recyclable |
---|
isDisposed, recycle |
Constructor Detail |
---|
public DefaultTemplateContext()
public DefaultTemplateContext(TemplateContext ctx)
ctx
- a parent context.Method Detail |
---|
public void recycle(TemplateContext ctx)
ctx
- a parent context.public void dispose()
RecyclableSupport
dispose
in interface Recyclable
dispose
in class RecyclableSupport
public List<TemplateContext> getParents()
TemplateContext
getParents
in interface TemplateContext
public TemplateContext getParent(int index)
TemplateContext
getParent
in interface TemplateContext
index
- the index.
public TemplateContext setParent(int index, TemplateContext context)
TemplateContext
setParent
in interface TemplateContext
index
- the index.context
- a parent context.
public boolean addParent(TemplateContext context)
TemplateContext
addParent
in interface TemplateContext
context
- a parent context.
public boolean addParent(int index, TemplateContext context)
TemplateContext
addParent
in interface TemplateContext
index
- the index.context
- a parent context.
public boolean removeParent(TemplateContext context)
TemplateContext
removeParent
in interface TemplateContext
context
- a parent context.
public TemplateContext removeParent(int index)
TemplateContext
removeParent
in interface TemplateContext
index
- the index.
public int numberOfParents()
TemplateContext
numberOfParents
in interface TemplateContext
public void clearParents()
TemplateContext
clearParents
in interface TemplateContext
public Content getContent()
TemplateContext
getContent
in interface TemplateContext
public HttpFilterChain getFilterChain()
TemplateContext
getFilterChain
in interface TemplateContext
public Object get(String key)
TemplateContext
get
in interface TemplateContext
key
- the key.
public void set(String key, Object value)
TemplateContext
set
in interface TemplateContext
key
- the key.value
- the value.public Object put(String key, Object value)
TemplateContext
put
in interface TemplateContext
key
- the key.value
- the value.
public Object remove(String key)
TemplateContext
remove
in interface TemplateContext
key
- the key.
public boolean containsKey(String key)
TemplateContext
containsKey
in interface TemplateContext
key
- the key.
public Set<String> keySet()
TemplateContext
keySet
in interface TemplateContext
public Collection<Object> values()
TemplateContext
values
in interface TemplateContext
public int size()
TemplateContext
size
in interface TemplateContext
public void clear()
TemplateContext
clear
in interface TemplateContext
public ContextToolFilter getContextToolFilter()
TemplateContext
getContextToolFilter
in interface TemplateContext
public MBeanServer getMBeanServer()
TemplateContext
getMBeanServer
in interface TemplateContext
public void valueBound(HttpSessionBindingEvent event)
valueBound
in interface HttpSessionBindingListener
public void valueUnbound(HttpSessionBindingEvent event)
valueUnbound
in interface HttpSessionBindingListener
public void valueBound(ServletRequestBindingEvent event)
ServletRequestBindingListener
valueBound
in interface ServletRequestBindingListener
event
- the binding event.public void valueUnbound(ServletRequestBindingEvent event)
ServletRequestBindingListener
valueUnbound
in interface ServletRequestBindingListener
event
- the binding event.protected void setContextToolFilterMBean(MBeanReference<? extends ContextToolFilter> ref)
ref
- the context tool filter reference.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |