|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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.
| Field Summary |
|---|
| Fields inherited from interface org.norther.tammi.spray.engine.context.TemplateContext |
|---|
CONTEXT |
| 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 |
getParents()
Gets a read-only list of parents. |
Set |
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. |
protected void |
setContextToolFilterMBean(MBeanReference 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 |
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 Recyclabledispose in class RecyclableSupportpublic List getParents()
TemplateContext
getParents in interface TemplateContextpublic TemplateContext getParent(int index)
TemplateContext
getParent in interface TemplateContextindex - the index.
public TemplateContext setParent(int index,
TemplateContext context)
TemplateContext
setParent in interface TemplateContextindex - the index.context - a parent context.
public boolean addParent(TemplateContext context)
TemplateContext
addParent in interface TemplateContextcontext - a parent context.
public boolean addParent(int index,
TemplateContext context)
TemplateContext
addParent in interface TemplateContextindex - the index.context - a parent context.
public boolean removeParent(TemplateContext context)
TemplateContext
removeParent in interface TemplateContextcontext - a parent context.
public TemplateContext removeParent(int index)
TemplateContext
removeParent in interface TemplateContextindex - the index.
public int numberOfParents()
TemplateContext
numberOfParents in interface TemplateContextpublic void clearParents()
TemplateContext
clearParents in interface TemplateContextpublic Content getContent()
TemplateContext
getContent in interface TemplateContextpublic HttpFilterChain getFilterChain()
TemplateContext
getFilterChain in interface TemplateContext
public Object put(String key,
Object value)
TemplateContext
put in interface TemplateContextkey - the key.value - the value.
public Object get(String key)
TemplateContext
get in interface TemplateContextkey - the key.
public Object remove(String key)
TemplateContext
remove in interface TemplateContextkey - the key.
public boolean containsKey(String key)
TemplateContext
containsKey in interface TemplateContextkey - the key.
public Set keySet()
TemplateContext
keySet in interface TemplateContextpublic Collection values()
TemplateContext
values in interface TemplateContextpublic int size()
TemplateContext
size in interface TemplateContextpublic void clear()
TemplateContext
clear in interface TemplateContextpublic ContextToolFilter getContextToolFilter()
TemplateContext
getContextToolFilter in interface TemplateContextpublic MBeanServer getMBeanServer()
TemplateContext
getMBeanServer in interface TemplateContextpublic void valueBound(HttpSessionBindingEvent event)
valueBound in interface HttpSessionBindingListenerpublic void valueUnbound(HttpSessionBindingEvent event)
valueUnbound in interface HttpSessionBindingListenerpublic void valueBound(ServletRequestBindingEvent event)
ServletRequestBindingListener
valueBound in interface ServletRequestBindingListenerevent - the binding event.public void valueUnbound(ServletRequestBindingEvent event)
ServletRequestBindingListener
valueUnbound in interface ServletRequestBindingListenerevent - the binding event.protected void setContextToolFilterMBean(MBeanReference ref)
ref - the context tool filter reference.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||