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