2 * © 2008 INA Service GmbH
4 package net.pterodactylus.util.fcp;
7 * A basic message abstraction that wraps a received FCP message.
9 * @author David ‘Bombe’ Roden <bombe@freenetproject.org>
12 public class BaseMessage {
14 /** The received message, wrapped here. */
15 private final FcpMessage receivedMessage;
18 * Creates a new base message that wraps the given message.
20 * @param receivedMessage
21 * The FCP message that was received
23 BaseMessage(FcpMessage receivedMessage) {
24 this.receivedMessage = receivedMessage;
28 * Returns the name of the message.
30 * @return The name of the message
32 public String getName() {
33 return receivedMessage.getName();
37 * Returns the content of the field.
40 * The name of the field
41 * @return The content of the field, or <code>null</code> if there is no
44 public String getField(String field) {
45 return receivedMessage.getField(field);