Exemple #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);
 }
 @Override
 public String retrieveJson() throws ResourceException {
   final ConcurrentHashMap<String, String> ret = getPrefixesByURI();
   return JSONEncoder.encode(ret);
 }
Exemple #3
0
 @Get("json")
 public String getEvents() {
   final Event[] outgoingEvents = getController().getEvents(getSessionId());
   return JSONEncoder.encode(outgoingEvents);
 }