|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectca.sqlpower.wabit.dao.json.WabitJSONMessageDecoder
public class WabitJSONMessageDecoder
An implementation of MessageDecoder that takes in a String that is
intended to be a JSON-formatted message, and constructs a JSONObject from it.
It then expects JSONObject key values that map to WabitPersister
methods and their expected parameters. It then extracts this information from
the JSONObject and makes the appropriate method calls to a
WabitPersister provided in the constructor.
| Constructor Summary | |
|---|---|
WabitJSONMessageDecoder(WabitPersister persister)
Creates a WabitMessageDecoder with the given WabitPersister. |
|
| Method Summary | |
|---|---|
void |
decode(java.lang.String message)
Takes in a message in the form of String. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WabitJSONMessageDecoder(@Nonnull
WabitPersister persister)
WabitPersister. The
messages that this class decodes will contain WabitPersister method calls
with their parameters. This decoder will use the messages to make method
calls to the given WabitPersister.
persister - The WabitPersister that this decoder will make method
calls to| Method Detail |
|---|
public void decode(@Nonnull
java.lang.String message)
throws WabitPersistenceException
WabitPersister.WabitPersistMethod. This is
used to determine which WabitPersister method to call.JSONObject.NULLWabitPersister for full details
on the expected values
decode in interface MessageDecoder<java.lang.String>WabitPersistenceException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||