Prism.framework
Interface IDispatch

All Known Implementing Classes:
FIFODispatch

public interface IDispatch

In Prism all communication happens using messages. These messages have to be routed through different components and connectors. A IDispatch interface would provide access to message list and its properties. At least one class that defines this interface should be instantiated in the architecture.

Version:
0.1
Author:
Nikunj Mehta

Method Summary
 void add(Message m)
          Add a message to the list in an arbitrary order.
 Message getMessage()
          Get the next message to be dispatched in an arbitrary order.
 int getWaitingLength()
          Get the number of messages waiting to be dispatched.
 void setMessageCapacity(int n)
          Set the capacity of messages that can be stored before being dispatched
 

Method Detail

add

public void add(Message m)
Add a message to the list in an arbitrary order.
Parameters:
m - Message object to be added to the list

getWaitingLength

public int getWaitingLength()
Get the number of messages waiting to be dispatched.
Returns:
int Number of waiting messages

getMessage

public Message getMessage()
Get the next message to be dispatched in an arbitrary order. The order is decided by the class implementing this interface
Returns:
Message the message object for dispatched message

setMessageCapacity

public void setMessageCapacity(int n)
Set the capacity of messages that can be stored before being dispatched
Parameters:
n - int the required capacity of the message store