org.apache.excalibur.event
Interface Message


public interface Message

A Source implements the side of an event queue where queue elements are dequeued operations only.

The interface design is heavily influenced by Matt Welsh's SandStorm server, his demonstration of the SEDA architecture. We have deviated where we felt the design differences where better.

Author:
Avalon Development Team

Method Summary
 void attach(java.lang.Object attachment)
          Attach an Object to the message.
 void clear()
          Clear the attachment.
 java.lang.Object getAttachment()
          Get the attachment associated with this Message.
 

Method Detail

getAttachment

public java.lang.Object getAttachment()
Get the attachment associated with this Message. If there is no attachment, this method will return null.

Returns:
Object the attached Object

attach

public void attach(java.lang.Object attachment)
Attach an Object to the message.

Parameters:
attachment - Any arbitrary Object you wish to attach to the Message

clear

public void clear()
Clear the attachment.



Copyright © 1997-2005 The Apache Software Foundation. All Rights Reserved.