@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); }
@Get("json") public String getEvents() { final Event[] outgoingEvents = getController().getEvents(getSessionId()); return JSONEncoder.encode(outgoingEvents); }