Added Getter to Packets
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>org.openautonomousconnection</groupId>
|
||||
<artifactId>protocol</artifactId>
|
||||
<version>1.0.0-BETA.2</version>
|
||||
<version>1.0.0-BETA.3</version>
|
||||
<organization>
|
||||
<name>Open Autonomous Connection</name>
|
||||
<url>https://open-autonomous-connection.org/</url>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package org.openautonomousconnection.protocol.packets.v1_0_0.beta;
|
||||
|
||||
import dev.unlegitdqrk.unlegitlibrary.network.system.packets.PacketHandler;
|
||||
import lombok.Getter;
|
||||
import org.openautonomousconnection.protocol.packets.OACPacket;
|
||||
import org.openautonomousconnection.protocol.versions.ProtocolVersion;
|
||||
import org.openautonomousconnection.protocol.versions.v1_0_0.beta.INSRecordType;
|
||||
@@ -23,11 +24,16 @@ import java.io.ObjectOutputStream;
|
||||
*/
|
||||
public final class INSQueryPacket extends OACPacket {
|
||||
|
||||
public String tln;
|
||||
public String name;
|
||||
public String sub;
|
||||
public INSRecordType type;
|
||||
public int clientId;
|
||||
@Getter
|
||||
private String tln;
|
||||
@Getter
|
||||
private String name;
|
||||
@Getter
|
||||
private String sub;
|
||||
@Getter
|
||||
private INSRecordType type;
|
||||
@Getter
|
||||
private int clientId;
|
||||
|
||||
/**
|
||||
* Creates a new INS query packet with all required parameters.
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package org.openautonomousconnection.protocol.packets.v1_0_0.beta;
|
||||
|
||||
import dev.unlegitdqrk.unlegitlibrary.network.system.packets.PacketHandler;
|
||||
import lombok.Getter;
|
||||
import org.openautonomousconnection.protocol.ProtocolBridge;
|
||||
import org.openautonomousconnection.protocol.packets.OACPacket;
|
||||
import org.openautonomousconnection.protocol.versions.ProtocolVersion;
|
||||
@@ -27,10 +28,14 @@ import java.util.List;
|
||||
*/
|
||||
public final class INSResponsePacket extends OACPacket {
|
||||
|
||||
@Getter
|
||||
private final ProtocolBridge bridge;
|
||||
public INSResponseStatus status;
|
||||
public List<INSRecord> records;
|
||||
public int clientId;
|
||||
@Getter
|
||||
private INSResponseStatus status;
|
||||
@Getter
|
||||
private List<INSRecord> records;
|
||||
@Getter
|
||||
private int clientId;
|
||||
|
||||
/**
|
||||
* Creates a populated response packet.
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package org.openautonomousconnection.protocol.packets.v1_0_0.beta;
|
||||
|
||||
import dev.unlegitdqrk.unlegitlibrary.network.system.packets.PacketHandler;
|
||||
import lombok.Getter;
|
||||
import org.openautonomousconnection.protocol.packets.OACPacket;
|
||||
import org.openautonomousconnection.protocol.versions.ProtocolVersion;
|
||||
import org.openautonomousconnection.protocol.versions.v1_0_0.beta.WebRequestMethod;
|
||||
@@ -12,9 +13,16 @@ import java.util.Map;
|
||||
|
||||
public final class WebRequestPacket extends OACPacket {
|
||||
|
||||
@Getter
|
||||
private String path;
|
||||
|
||||
@Getter
|
||||
private WebRequestMethod method;
|
||||
|
||||
@Getter
|
||||
private Map<String,String> headers;
|
||||
|
||||
@Getter
|
||||
private byte[] body;
|
||||
|
||||
public WebRequestPacket() {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package org.openautonomousconnection.protocol.packets.v1_0_0.beta;
|
||||
|
||||
import dev.unlegitdqrk.unlegitlibrary.network.system.packets.PacketHandler;
|
||||
import lombok.Getter;
|
||||
import org.openautonomousconnection.protocol.packets.OACPacket;
|
||||
import org.openautonomousconnection.protocol.versions.ProtocolVersion;
|
||||
|
||||
@@ -11,9 +12,16 @@ import java.util.Map;
|
||||
|
||||
public final class WebResponsePacket extends OACPacket {
|
||||
|
||||
@Getter
|
||||
private int statusCode; // 200, 404, 500 ...
|
||||
|
||||
@Getter
|
||||
private String contentType; // text/ohtml, text/plain, application/json, text/py
|
||||
|
||||
@Getter
|
||||
private Map<String,String> headers;
|
||||
|
||||
@Getter
|
||||
private byte[] body;
|
||||
|
||||
public WebResponsePacket() {
|
||||
|
||||
Reference in New Issue
Block a user