Class prominence.msg.RoutingOutputStream
All Packages Class Hierarchy This Package Previous Next Index
Class prominence.msg.RoutingOutputStream
java.lang.Object
|
+----java.io.OutputStream
|
+----java.io.FilterOutputStream
|
+----java.io.DataOutputStream
|
+----prominence.msg.MessageOutput
|
+----prominence.msg.RoutingOutputStream
- public class RoutingOutputStream
- extends MessageOutput
A MessageOutput that attaches to an existing MessageOutput
and attaches a routing list to the header of each message that is
transmitted.
The routing list is specified with the targeted send()
methods.
- See Also:
- RoutingInputStream
-
byteO
- A ByteArrayOutputStream used to buffere the current message
contents.
-
o
- The MessageOutput to which this is attached.
-
RoutingOutputStream(MessageOutput)
- Creates a new RoutingOutputStream.
-
send()
- Sends the current message with a null routing list; this
is usually interpreted as a broadcast.
-
send(String[])
- Sends the current message with the specified routing list.
o
protected MessageOutput o
- The MessageOutput to which this is attached.
byteO
protected ByteArrayOutputStream byteO
- A ByteArrayOutputStream used to buffere the current message
contents.
RoutingOutputStream
public RoutingOutputStream(MessageOutput o)
- Creates a new RoutingOutputStream.
- Parameters:
- o - The MessageOutput to which to send messages
send
public void send() throws IOException
- Sends the current message with a null routing list; this
is usually interpreted as a broadcast.
- Throws: IOException
- Occurs if there is a problem sending the
message.
- Overrides:
- send in class MessageOutput
send
public void send(String dst[]) throws IOException
- Sends the current message with the specified routing list. The
call is passed on as an untargeted send() to the
attached stream.
- Throws: IOException
- Occurs if there is a problem sending the
message.
- Overrides:
- send in class MessageOutput
All Packages Class Hierarchy This Package Previous Next Index