SonicMQ API

com.sonicsw.stream
Interface SonicOutputStreamController


public interface SonicOutputStreamController

A sonicOutputStreamController object is used to create instances of SonicStream objects, and to receive data via those stream instances. The stream controller object is also used to send notification messages from consumersof SonicStream objects back to the sender.


Method Summary
 void close()
          Closes current stream managed by this controller instance, JMS objects created by this controller instance, and the controller itself.
 SonicStream createStream(java.lang.String id)
          Creates SonicOutputStream instance with the specified ID.
 StreamStatus getCurrentStreamStatus()
          Returns current SonicOutputStream status as instance of StreamStatus.
 Destination getNotificationDestination()
          Returns the default JMS destination to which this SonicInputStreamController instance sends notifications.
 Destination getStreamDestination()
          Returns JMS destination to which stream contents are written.
 void registerExceptionListener(SonicStreamExceptionListener list)
          Registers a listener that will receive notification of asynchronous exceptions.
 void registerNotificationListener(SonicStreamListener list)
          Registers a listener that will receive notifications from receivers.
 void releaseStream(SonicStream ss)
          Closes the given SonicStream instance and releases its associated resources.
 

Method Detail

registerExceptionListener

void registerExceptionListener(SonicStreamExceptionListener list)
Registers a listener that will receive notification of asynchronous exceptions.

Only a single listener may be registered at a given time. If this method is invoked multiple times, with a different SonicStreamExceptionListener reference each time, only the listener specified in the last invocation of this method will receive exceptions.

Parameters:
list - reference to a SonicStreamExceptionListener instance
See Also:
SonicStreamExceptionListener

registerNotificationListener

void registerNotificationListener(SonicStreamListener list)
Registers a listener that will receive notifications from receivers.

Only a single listener may be registered at a given time. If this method is invoked multiple times, with a different SonicStreamListener reference each time, only the listener specified in the last invocation of this method will receive notifications.

Parameters:
list - reference to a SonicStreamListener instance
See Also:
SonicStreamListener

createStream

SonicStream createStream(java.lang.String id)
                         throws SonicStreamException
Creates SonicOutputStream instance with the specified ID. The ID will be included in the header of every message sent via the stream.

Parameters:
id - identifier to be associated with stream instance
Returns:
SonicStream reference to SonicOutputStream instance
Throws:
SonicStreamException

releaseStream

void releaseStream(SonicStream ss)
                   throws SonicStreamException
Closes the given SonicStream instance and releases its associated resources.

Parameters:
ss - reference to SonicStream instance to close
Throws:
SonicStreamException

close

void close()
           throws SonicStreamException
Closes current stream managed by this controller instance, JMS objects created by this controller instance, and the controller itself.

Throws:
SonicStreamException

getCurrentStreamStatus

StreamStatus getCurrentStreamStatus()
Returns current SonicOutputStream status as instance of StreamStatus.

Returns:
StreamStatus
See Also:
StreamStatus

getNotificationDestination

Destination getNotificationDestination()
Returns the default JMS destination to which this SonicInputStreamController instance sends notifications.

Returns:
javax.jms.Destination

getStreamDestination

Destination getStreamDestination()
Returns JMS destination to which stream contents are written.

Returns:
javax.jms.Destination

SonicMQ API

Copyright © 1999-2010 Progress Software Corporation. All Rights Reserved.
HTML formatted on 15-September-2010.