2 * © 2008 INA Service GmbH
4 package net.pterodactylus.util.fcp.message;
6 import net.pterodactylus.util.fcp.FcpMessage;
9 * A basic message abstraction that wraps a received FCP message.
11 * @author <a href="mailto:dr@ina-germany.de">David Roden</a>
14 public class BaseMessage {
16 /** The received message, wrapped here. */
17 private final FcpMessage receivedMessage;
20 * Creates a new base message that wraps the given message.
22 * @param receivedMessage
23 * The FCP message that was received
25 public BaseMessage(FcpMessage receivedMessage) {
26 this.receivedMessage = receivedMessage;
30 * Returns the name of the message.
32 * @return The name of the message
34 public String getName() {
35 return receivedMessage.getName();
39 * Returns the content of the field.
42 * The name of the field
43 * @return The content of the field, or <code>null</code> if there is no
46 public String getField(String field) {
47 return receivedMessage.getField(field);