Package com.dianping.cat.message

Examples of com.dianping.cat.message.Event.complete()


  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
View Full Code Here


    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);
View Full Code Here

    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();
View Full Code Here

      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) {
View Full Code Here

    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);
    }
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.