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

## rice.pastry.messaging
Class MessageDispatch

    java.lang.Object
      rice.pastry.messaging.MessageDispatch

public class MessageDispatch
extends java.lang.Object

An object which remembers the mapping from names to MessageReceivers and dispatches messages by request.

Version:
  $Id: MessageDispatch.java,v 1.13 2005/03/11 00:58:13 jeffh Exp $
Author:
  Andrew Ladd

Field Summary
`static int` | `BUFFER_SIZE` DESCRIBE THE FIELD

Constructor Summary
`MessageDispatch()` Constructor.

Method Summary
`protected void` | `deliverBuffered(Address address)` DESCRIBE THE METHOD
`boolean` | `dispatchMessage(Message msg)` Dispatches a message to the appropriate receiver.
`MessageReceiver` | `getDestination(Message msg)` Gets the Destination attribute of the MessageDispatch object
`MessageReceiver` | `getDestinationByAddress(Address addr)` Gets the DestinationByAddress attribute of the MessageDispatch object
`void` | `registerReceiver(Address address, MessageReceiver receiver)` Registers a receiver with the mail service.

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

Field Detail

### BUFFER_SIZE

    public static int BUFFER_SIZE

  DESCRIBE THE FIELD

Constructor Detail

### MessageDispatch

    public MessageDispatch()

  Constructor.

Method Detail

### getDestination

    public MessageReceiver getDestination(Message msg)

  Gets the Destination attribute of the MessageDispatch object

  Parameters:
    `msg` - DESCRIBE THE PARAMETER
  Returns:
    The Destination value

### getDestinationByAddress

    public MessageReceiver getDestinationByAddress(Address addr)

  Gets the DestinationByAddress attribute of the MessageDispatch object

  Parameters:
    `addr` - DESCRIBE THE PARAMETER
  Returns:
    The DestinationByAddress value

### registerReceiver

    public void registerReceiver(Address address,
                                 MessageReceiver receiver)

  Registers a receiver with the mail service.

  Parameters:
    `receiver` - the receiver.
    `address` - DESCRIBE THE PARAMETER

### dispatchMessage

    public boolean dispatchMessage(Message msg)

  Dispatches a message to the appropriate receiver.

  Parameters:
    `msg` - the message.
  Returns:
    true if message could be dispatched, false otherwise.

### deliverBuffered

    protected void deliverBuffered(Address address)

  DESCRIBE THE METHOD

  Parameters:
    `address` - DESCRIBE THE PARAMETER

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

Copyright © 2001-2005 - Rice Pastry.