@Singleton @Named(value="snippet") public class SnippetMacro extends AbstractMacro
Constructor and Description |
---|
SnippetMacro() |
Modifier and Type | Method and Description |
---|---|
void |
cacheSnippet(URL url,
String id,
String content)
Puts the given snippet into the cache.
|
void |
execute(Sink sink,
MacroRequest request)
Execute the current macro using the given MacroRequest,
and emit events into the given sink.
|
void |
setCacheTimeout(int time)
Set the cache timeout.
|
getAttributesFromMap
public SnippetMacro()
public void execute(Sink sink, MacroRequest request) throws MacroExecutionException
sink
- The sink to receive the events.request
- The corresponding MacroRequest.MacroExecutionException
- if an error occurred during execution.public void cacheSnippet(URL url, String id, String content)
url
- The URL to parse.id
- The id of the snippet.content
- The content of the snippet.public void setCacheTimeout(int time)
time
- The timeout to set.Copyright © 2005–2024 The Apache Software Foundation. All rights reserved.