BrightSide Workbench Full Report + Source Code
org.turro.elephant.snippet.TestSnippet Class Reference
Inheritance diagram for org.turro.elephant.snippet.TestSnippet:
Collaboration diagram for org.turro.elephant.snippet.TestSnippet:

Protected Member Functions

void doProcess (Application application, KeyValueMap map)
 
- Protected Member Functions inherited from org.turro.elephant.snippet.AbstractSnippet
Optional< Jsons > getJson (KeyValueMap map)
 
void writeResponse (Application application, String response) throws IOException
 

Additional Inherited Members

- Public Member Functions inherited from org.turro.elephant.snippet.AbstractSnippet
void process (Application application, KeyValueMap map)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 33 of file TestSnippet.java.

Member Function Documentation

◆ doProcess()

void org.turro.elephant.snippet.TestSnippet.doProcess ( Application  application,
KeyValueMap  map 
)
protected

Reimplemented from org.turro.elephant.snippet.AbstractSnippet.

Definition at line 36 of file TestSnippet.java.

36  {
37  try {
38  writeResponse(application, Jsons.object()
39  .add("message", "Hello!")
40  .add("from", ElephantContext.getSiteName())
41  .add("request", getJson(map)
42  .map(j -> j.getStructure().asValue())
43  .orElse(Jsons.EMPTY_VALUE)).build());
44  } catch (IOException ex) {
45  WebLoggers.warning(TestSnippet.class).exception(ex).log();
46  }
47  }
void writeResponse(Application application, String response)
Optional< Jsons > getJson(KeyValueMap map)
Here is the call graph for this function:

The documentation for this class was generated from the following file: