Ajout d'un nouveau packet pour PandacubeCore
This commit is contained in:
parent
d9d5e77105
commit
4ae06be523
@ -18,6 +18,7 @@ import fr.pandacube.java.util.network.packet.packets.core_slave.PacketServerProc
|
|||||||
import fr.pandacube.java.util.network.packet.packets.core_slave.PacketServerProcessInput;
|
import fr.pandacube.java.util.network.packet.packets.core_slave.PacketServerProcessInput;
|
||||||
import fr.pandacube.java.util.network.packet.packets.core_slave.PacketServerProcessQuery;
|
import fr.pandacube.java.util.network.packet.packets.core_slave.PacketServerProcessQuery;
|
||||||
import fr.pandacube.java.util.network.packet.packets.global.PacketClientAuthenticate;
|
import fr.pandacube.java.util.network.packet.packets.global.PacketClientAuthenticate;
|
||||||
|
import fr.pandacube.java.util.network.packet.packets.global.PacketClientLogRecord;
|
||||||
import fr.pandacube.java.util.network.packet.packets.global.PacketServerCantAuthenticate;
|
import fr.pandacube.java.util.network.packet.packets.global.PacketServerCantAuthenticate;
|
||||||
import fr.pandacube.java.util.network.packet.packets.global.PacketServerException;
|
import fr.pandacube.java.util.network.packet.packets.global.PacketServerException;
|
||||||
import fr.pandacube.java.util.network.packet.packets.web.PacketClientWebRequest;
|
import fr.pandacube.java.util.network.packet.packets.web.PacketClientWebRequest;
|
||||||
@ -105,6 +106,7 @@ public abstract class Packet implements ByteSerializable {
|
|||||||
addPacket(PacketServerProcessQuery.class);
|
addPacket(PacketServerProcessQuery.class);
|
||||||
|
|
||||||
addPacket(PacketClientAuthenticate.class);
|
addPacket(PacketClientAuthenticate.class);
|
||||||
|
addPacket(PacketClientLogRecord.class);
|
||||||
addPacket(PacketServerCantAuthenticate.class);
|
addPacket(PacketServerCantAuthenticate.class);
|
||||||
addPacket(PacketServerException.class);
|
addPacket(PacketServerException.class);
|
||||||
|
|
||||||
|
@ -0,0 +1,76 @@
|
|||||||
|
package fr.pandacube.java.util.network.packet.packets.global;
|
||||||
|
|
||||||
|
import fr.pandacube.java.util.network.packet.PacketClient;
|
||||||
|
import fr.pandacube.java.util.network.packet.bytebuffer.ByteBuffer;
|
||||||
|
|
||||||
|
public class PacketClientLogRecord extends PacketClient {
|
||||||
|
|
||||||
|
private long time;
|
||||||
|
private String level;
|
||||||
|
private String threadName;
|
||||||
|
private String message;
|
||||||
|
private String throwable;
|
||||||
|
|
||||||
|
public PacketClientLogRecord() {
|
||||||
|
super((byte)0x51);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deserializeFromByteBuffer(ByteBuffer buffer) {
|
||||||
|
time = buffer.getLong();
|
||||||
|
level = buffer.getString();
|
||||||
|
threadName = buffer.getString();
|
||||||
|
message = buffer.getString();
|
||||||
|
throwable = buffer.getString();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void serializeToByteBuffer(ByteBuffer buffer) {
|
||||||
|
buffer.putLong(time);
|
||||||
|
buffer.putString(level);
|
||||||
|
buffer.putString(threadName);
|
||||||
|
buffer.putString(message);
|
||||||
|
buffer.putString(throwable);
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getTime() {
|
||||||
|
return time;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTime(long time) {
|
||||||
|
this.time = time;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLevel() {
|
||||||
|
return level;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLevel(String level) {
|
||||||
|
this.level = level;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getThreadName() {
|
||||||
|
return threadName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setThreadName(String threadName) {
|
||||||
|
this.threadName = threadName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMessage() {
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMessage(String message) {
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getThrowable() {
|
||||||
|
return throwable;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setThrowable(String throwable) {
|
||||||
|
this.throwable = throwable;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user