public void raiseEvent(Object value, EventSeverity sev)
{
log.debug(String.format("Sending event of class %s with Severity %s",
value.getClass(), sev.ordinal()));
BBEncoder enc = this.init('e');
ClassBinding cb = bctx.getClassBinding(value.getClass());
String pkg = cb.getPackage();
String cls = cb.getName();
enc.writeStr8(pkg);
enc.writeStr8(cls);
enc.writeBin128(cb.getSchemaHash());
long now = System.currentTimeMillis() * 1000000;
enc.writeInt64(now);
enc.writeUint8((short) sev.ordinal());
for (PropertyBinding p : cb.getProperties())
{
p.getType().encode(enc, BindingUtils.get(p, value));
}
send(
String.format("console.event.%d.%d.%s.%s", bbank, abank, pkg,