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

Class prominence.msg.MessageOutput

java.lang.Object
   |
   +----java.io.OutputStream
           |
           +----java.io.FilterOutputStream
                   |
                   +----java.io.DataOutputStream
                           |
                           +----prominence.msg.MessageOutput

public class MessageOutput
extends DataOutputStream
The superclass for all message output streams.

Extends DataOutputStream and adds send() methods that send the current message to the attached channel.

See Also:
MessageInput

Constructor Index

 o MessageOutput(OutputStream)
Creates a new MessageOutput.

Method Index

 o send()
Sends the current message to the attached channel.
 o send(String)
Sends the current message to the attached channel with a routing header that indicates a single recipient.
 o send(String[])
Sends the current message to the attached channel with a routing header that indicates a list of recipients.

Constructors

 o MessageOutput
  public MessageOutput(OutputStream out)
Creates a new MessageOutput.
Parameters:
out - Stream to which to write message data.

Methods

 o send
  public abstract void send() throws IOException
Sends the current message to the attached channel.

Subclasses will extend this class and implement this method as appropriate for a particular communications channel.

Throws: IOException
Occurs if there is a problem sending a message.
 o send
  public void send(String dst[]) throws IOException
Sends the current message to the attached channel with a routing header that indicates a list of recipients.

Subclasses that support this method will override it with an appropriate implementation. The default implementation is to throw an exception.

Parameters:
dst - The list of intended recipients
Throws: IOException
Occurs if there is a problem sending a message or this method is not supported.
 o send
  public void send(String dst) throws IOException
Sends the current message to the attached channel with a routing header that indicates a single recipient.

The default implementation of this method calls the previous method with a single-element array.

Parameters:
dst - The intended recipient
Throws: IOException
Occurs if there is a problem sending a message or targeted sending is not supported.

All Packages  Class Hierarchy  This Package  Previous  Next  Index