|
||||||||||
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.tool.GlobalTool org.norther.tammi.spray.engine.tool.ContextTool org.norther.tammi.spray.engine.tool.ContentTool
public class ContentTool
A request context tool acting as a content holder.
Constructor Summary | |
---|---|
ContentTool()
Constructs a new content. |
Method Summary | |
---|---|
Content |
clear()
Clears the content. |
Object |
clone()
|
void |
dispose()
Disposes the object by setting its disposed flag. |
void |
failed(ContentProcessingEvent event)
Notifies the object that its processing has failed. |
void |
finished(ContentProcessingEvent event)
Notifies the object that its processing has finished. |
CharSequence |
get()
Gets the content. |
String |
getTarget()
The the current content processing target. |
String |
getTargetEncoding()
The the content processing target encoding. |
Writer |
getTargetWriter()
Gets the content processing target writer. |
void |
render(File file,
String encoding,
boolean... options)
Renders the contents of the specified file. |
void |
render(InputStream input,
String encoding,
boolean... options)
Renders the contents of the specified stream. |
void |
render(URL url,
String encoding,
boolean... options)
Renders the contents of the specified URL. |
CharSequence |
set(CharSequence content)
Sets the content. |
void |
started(ContentProcessingEvent event)
Notifies the object that its processing has started. |
String |
toString()
Converts the tool into a string. |
Methods inherited from class org.norther.tammi.spray.engine.tool.ContextTool |
---|
getFilter, getFilterChain, getFilterKey, getPrincipal, getRequest, getResponse, isFilterChanged |
Methods inherited from class org.norther.tammi.spray.engine.tool.GlobalTool |
---|
getContext, getContextToolFilter, getMBeanServer, isBound, nop, valueBound, valueUnbound |
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 |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.norther.tammi.core.pool.Recyclable |
---|
isDisposed, recycle |
Constructor Detail |
---|
public ContentTool()
Method Detail |
---|
public Object clone()
clone
in class GlobalTool
public void dispose()
RecyclableSupport
dispose
in interface Recyclable
dispose
in class ContextTool
public void started(ContentProcessingEvent event)
ContentProcessingListener
started
in interface ContentProcessingListener
event
- the processing event.public void finished(ContentProcessingEvent event)
ContentProcessingListener
finished
in interface ContentProcessingListener
event
- the processing event.public void failed(ContentProcessingEvent event)
ContentProcessingListener
failed
in interface ContentProcessingListener
event
- the processing event.public CharSequence get()
Content
get
in interface Content
public CharSequence set(CharSequence content)
Content
set
in interface Content
content
- the content.
public Content clear()
Content
clear
in interface Content
public String toString()
GlobalTool
toString
in interface Content
toString
in class GlobalTool
public String getTarget()
Content
getTarget
in interface Content
public String getTargetEncoding()
Content
getTargetEncoding
in interface Content
public Writer getTargetWriter()
Content
getTargetWriter
in interface Content
public void render(File file, String encoding, boolean... options)
file
- the file.encoding
- the encoding.options
- the encode xml option.public void render(URL url, String encoding, boolean... options)
url
- the URL.encoding
- the encoding.options
- the encode xml option.public void render(InputStream input, String encoding, boolean... options)
input
- the stream.encoding
- the encoding.options
- the encode xml option.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |