Beispiel #1
0
 @Post("json")
 public String postEvents(String serializedEvents) {
   final Event[] incomingEvents = JSONDecoder.decode(serializedEvents, Event[].class);
   getController().pushEvents(getSessionId(), incomingEvents);
   final Event[] outgoingEvents = getController().getEvents(getSessionId());
   return JSONEncoder.encode(outgoingEvents);
 }
Beispiel #2
0
 @Override
 public String retrieveJson() throws ResourceException {
   final ConcurrentHashMap<String, String> ret = getPrefixesByURI();
   return JSONEncoder.encode(ret);
 }
Beispiel #3
0
 @Get("json")
 public String getEvents() {
   final Event[] outgoingEvents = getController().getEvents(getSessionId());
   return JSONEncoder.encode(outgoingEvents);
 }