123456789101112131415161718192021222324 |
- package at.acdp.urweb.sclient.data;
- import com.eclipsesource.json.JsonObject;
- public class LogHolder implements IJsonObject{
- public long timestamp;
- public IJsonObject entry;
- public String type;
- public LogHolder(String type, IJsonObject entry) {
- this.entry=entry;
- this.timestamp=System.currentTimeMillis();
- this.type=type;
- }
- @Override
- public JsonObject toJSON() {
- return new JsonObject()
- .add("type", type)
- .add("ts", timestamp)
- .add("entry", entry.toJSON());
- }
- }
|