Class prominence.msg.RoutingInputStream
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class prominence.msg.RoutingInputStream

java.lang.Object
   |
   +----java.io.InputStream
           |
           +----java.io.FilterInputStream
                   |
                   +----java.io.DataInputStream
                           |
                           +----prominence.msg.MessageInput
                                   |
                                   +----prominence.msg.RoutingInputStream

public class RoutingInputStream
extends MessageInput
A MessageInput that attaches to an existing MessageInput and strips the routing header from each message that is received.

The routing header is made publicly accessible in the target variable.

See Also:
RoutingOutputStream

Variable Index

 o i
The MessageInput to which this is attached.
 o target
The routing list from the most recently received message.

Constructor Index

 o RoutingInputStream(MessageInput)
Creates a new RoutingInputStream.

Method Index

 o receive()
Receives a new message from i and strips the routing header.

Variables

 o target
  public String target[]
The routing list from the most recently received message.
 o i
  protected MessageInput i
The MessageInput to which this is attached.

Constructors

 o RoutingInputStream
  public RoutingInputStream(MessageInput i)
Creates a new RoutingInputStream.
Parameters:
i - The MessageInput from which messages should be received

Methods

 o receive
  public void receive() throws IOException
Receives a new message from i and strips the routing header. The routing list is accessible in the target variable; the contents of the message can be read through the usual superclass read() methods.
Throws: IOException
Occurs if there is a problem receiving a message or extracting the routing list.
Overrides:
receive in class MessageInput

All Packages  Class Hierarchy  This Package  Previous  Next  Index