/**
 * MessageHandler is the abstract base class that must be subtyped by all
 * classes that can be called by the MessageBroker message handling
 * functionality.  It is an abstract class rather than an interface due
 * to the need for a particular constructor signature.
 * <br>
 * This source code is copyright 2005 by Patrick May.  All
 * rights reserved.
 *
 * @author Patrick May (patrick@softwarematters.org)
 * @author &copy; 2005 Patrick May.  All rights reserved.
 * @version 1
 */

package org.softwarematters.example.MessageBroker;

import java.io.InputStream;
import java.io.OutputStream;

public abstract class MessageHandler
{
  protected String message_ = null;

  /**
   * The full constructor for the MessageHandler class.
   *
   * @param message The message to use to attempt to construct an object
   *                of a particular subtype of MessageHandler.
   */
  public MessageHandler(String message) throws UnknownMessageFormatException
    {
    message_ = message;
    }


  /**
   * Handle the message.
   *
   * @param context The context in which the handler has been invoked.
   */
  public abstract void handleMessage(MessageHandlerContext context);
}  // end MessageHandler

