Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.jetspeed.portlet.event
Class MessageAdapter

    java.lang.Object
      |
      +--org.apache.jetspeed.portlet.event.MessageAdapter

All Implemented Interfaces:
  MessageListener

public abstract class MessageAdapter
extends java.lang.Object
implements MessageListener

The `MessageAdapter` is an message listener in which all callback methods are empty implementations. The message adapter makes it more convenient for an object to listen for message events. In particular, by using the message adapter, it is possible to implement only those callback methods in which you are interested. Without the Message adapter, you must implement all callback methods, even if the method is empty.

At this stage, this may sound like overkill since the message listener only defines one method. The adapter therefore only provides a default implementation for a method you are going override anyway. But to ensure backward compatibility in future release, it is recommended to still follow this practice so that you will be able to enjoy functionality in future releases without having to go back to all your listener code.

To use the message adapter, you create a subclass of `MessageAdapter` and override the desired callback methods. You then create an instance of the message adapter subclass and use it to register it as a listener for message events.

Author:
  Thomas F. Boehme
See Also:
  `MessageEvent`

Constructor Summary
`MessageAdapter()`

Method Summary
`void` | `messageReceived(MessageEvent event)` Notifies this listener that the message which the listener is watching for has been performed.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MessageAdapter

    public MessageAdapter()

Method Detail

### messageReceived

    public void messageReceived(MessageEvent event)

  Description copied from interface: `MessageListener`
  Notifies this listener that the message which the listener is watching for has been performed.

  Specified by:
    `messageReceived` in interface `MessageListener`
  Parameters:
    `event` - the message event

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002 Apache Software Foundation. All Rights Reserved.