SonicMQ API

com.sonicsw.stream
Interface SonicStream


public interface SonicStream

A SonicStream represents data sent over JMS that can be read or written using java.io.InputStream or java.io.OutputStream api. It also provides some control information associated with the data. An instance of a SonicStream is either an input stream or an output stream, depending on whether it was created using a SonicInputStreamController or a SonicOutputStreamController.


Method Summary
 Message getHeaderMessage()
          Gets the JMS Message that is sent as the first message of the stream.
 java.io.InputStream getInputStream()
          Gets the InputStream instance of this SonicStream instance.
 Destination getNotificationDestination()
          Gets the JMS Destination used by this SonicStream instance for notifications.
 java.io.OutputStream getOutputStream()
          Gets the OutputStream instance of this SonicStream instance.
 java.lang.String getStreamId()
          Gets the identifier that is used to distinguish a SonicStream instance (and its associated segments) from other SonicStream instances.
 StreamStatus getStreamStatus()
          Gets the current status of a SonicStream instance.
 

Method Detail

getHeaderMessage

Message getHeaderMessage()
Gets the JMS Message that is sent as the first message of the stream.

Returns:
reference to JMS Message instance used as the header message

getStreamId

java.lang.String getStreamId()
Gets the identifier that is used to distinguish a SonicStream instance (and its associated segments) from other SonicStream instances.

Returns:
stream identifier

getInputStream

java.io.InputStream getInputStream()
Gets the InputStream instance of this SonicStream instance.

Returns:
reference to InputStream instance of this SonicStream

getOutputStream

java.io.OutputStream getOutputStream()
Gets the OutputStream instance of this SonicStream instance.

Returns:
reference to OutputStream instance of this SonicStream

getNotificationDestination

Destination getNotificationDestination()
Gets the JMS Destination used by this SonicStream instance for notifications.

For an input stream, notifications will be sent in the form of JMS TextMessages to this Destination.

For output streams, notification data will be received, in the form of JMS TextMessages, from this Destination.

Returns:
reference to Destination used by SonicStream instance

getStreamStatus

StreamStatus getStreamStatus()
Gets the current status of a SonicStream instance.

The status is returned as a StreamStatus object.

Returns:
current status of SonicStream instance
See Also:
StreamStatus

SonicMQ API

Copyright © 1999-2011 Progress Software Corporation. All Rights Reserved.
HTML formatted on 5-August-2011.