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