ConvertEvent cev; if (!(rev instanceof ConvertEvent)) throw new UnknownEventException("Unexpected event type"); cev = (ConvertEvent) rev; long seq = cev.getSequenceNumber(); int val = cev.getValue(); System.out.println("Convert #" + seq + ": " + val);