2 * © 2008 INA Service GmbH
4 package net.pterodactylus.util.fcp;
8 * A basic message abstraction that wraps a received FCP message.
10 * @author <a href="mailto:dr@ina-germany.de">David Roden</a>
13 public class BaseMessage {
15 /** The received message, wrapped here. */
16 private final FcpMessage receivedMessage;
19 * Creates a new base message that wraps the given message.
21 * @param receivedMessage
22 * The FCP message that was received
24 public BaseMessage(FcpMessage receivedMessage) {
25 this.receivedMessage = receivedMessage;
29 * Returns the name of the message.
31 * @return The name of the message
33 public String getName() {
34 return receivedMessage.getName();
38 * Returns the content of the field.
41 * The name of the field
42 * @return The content of the field, or <code>null</code> if there is no
45 public String getField(String field) {
46 return receivedMessage.getField(field);