X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fnet%2Fpterodactylus%2Futil%2Ffcp%2FBaseMessage.java;h=e5f043a5cc54085e0c036bfa3aa8883f3b5c9045;hb=ebf4d1a0fb0f7e00e5aff798270dd2124070886a;hp=08822905cf4b049f1a4ad479733f6e7ef13cdef7;hpb=b9a83b75fbab2af9cb9e6217b7ea4414b59b8851;p=jSite2.git
diff --git a/src/net/pterodactylus/util/fcp/BaseMessage.java b/src/net/pterodactylus/util/fcp/BaseMessage.java
index 0882290..e5f043a 100644
--- a/src/net/pterodactylus/util/fcp/BaseMessage.java
+++ b/src/net/pterodactylus/util/fcp/BaseMessage.java
@@ -3,6 +3,7 @@
*/
package net.pterodactylus.util.fcp;
+import java.util.Map;
/**
* A basic message abstraction that wraps a received FCP message.
@@ -21,7 +22,7 @@ public class BaseMessage {
* @param receivedMessage
* The FCP message that was received
*/
- public BaseMessage(FcpMessage receivedMessage) {
+ BaseMessage(FcpMessage receivedMessage) {
this.receivedMessage = receivedMessage;
}
@@ -42,8 +43,18 @@ public class BaseMessage {
* @return The content of the field, or null
if there is no
* such field
*/
- public String getField(String field) {
+ protected String getField(String field) {
return receivedMessage.getField(field);
}
+ /**
+ * Returns all fields from the received message.
+ *
+ * @see FcpMessage#getFields()
+ * @return All fields from the message
+ */
+ protected Map getFields() {
+ return receivedMessage.getFields();
+ }
+
}