949596979899100101102103104
public void sendEvent() throws Exception { for (int i = 0; i < 100; i++) { Event t = Cat.getProducer().newEvent("Test", "Test"); t.addData("key and value"); t.complete(); } Thread.sleep(1000); } @Test
7980818283848586878889
if (nameValuePairs != null && nameValuePairs.length() > 0) { event.addData(nameValuePairs); } event.setStatus(status); event.complete(); } @Override public void logHeartbeat(String type, String name, String status, String nameValuePairs) { Heartbeat heartbeat = newHeartbeat(type, name);
484485486487488489490491492493494
public String getValue() { Event event = Cat.newEvent(Cat.getManager().getDomain() + ":ReadCookie", m_cookie.getName()); event.setStatus(Event.SUCCESS); event.complete(); return m_cookie.getValue(); } public int getVersion() { return m_cookie.getVersion();
575576577578579580581582583584585
event.setStatus(Event.SUCCESS); event.addData("domain", cookie.getDomain()); event.addData("path", cookie.getPath()); event.addData("maxAge", cookie.getMaxAge()); event.complete(); super.addCookie(cookie); } @Override public void addHeader(String name, String value) {
585586587588589590591592593594
public void addHeader(String name, String value) { Event event = Cat.newEvent(Cat.getManager().getDomain() + ":SetHead", name); event.setStatus(Event.SUCCESS); event.addData("value", value); event.complete(); super.addHeader(name, value); } } }