com.sun.im.service
Interface StreamingService


public interface StreamingService

Author:
Rahul

Field Summary
static java.lang.String INBAND_STREAM_METHOD
          This method streams the data through the server
static java.lang.String OUTBAND_STREAM_METHOD
          This method streams the data bypassing the server
 
Method Summary
 void addStreamingServiceListener(StreamingServiceListener listener)
          Add an additional StreamingServiceListener to receive the event notifications.
 void initialize(StreamingServiceListener listener)
          intialize the service by providing a StreamingServiceListener.
 ContentStream open(java.lang.String rcpt, java.lang.String[] methods, SenderStreamingProfile profile, ContentStreamListener listener)
          Opens a ContentStream with the recipient.
 void removeStreamingServiceListener(StreamingServiceListener listener)
          Removes an already added ConfereneServiceListener.
 

Field Detail

INBAND_STREAM_METHOD

public static final java.lang.String INBAND_STREAM_METHOD
This method streams the data through the server

See Also:
Constant Field Values

OUTBAND_STREAM_METHOD

public static final java.lang.String OUTBAND_STREAM_METHOD
This method streams the data bypassing the server

See Also:
Constant Field Values
Method Detail

open

public ContentStream open(java.lang.String rcpt,
                          java.lang.String[] methods,
                          SenderStreamingProfile profile,
                          ContentStreamListener listener)
                   throws CollaborationException
Opens a ContentStream with the recipient. The stream will be used to stream the data to the recipient

Parameters:
rcpt - - The recipient of the stream
methods - - The array of methods for the transfer as defined in StreamingService
profile - - The sender streaming profile containing the meta data about the stream
listener - - The ContentStreamListener to be used for notifications
Throws:
CollaborationException

initialize

public void initialize(StreamingServiceListener listener)
                throws CollaborationException
intialize the service by providing a StreamingServiceListener. Service should be initialized by calling this method before using any of the services of StreamingService

Parameters:
listener - StreamingServiceListener
Throws:
CollaborationException

addStreamingServiceListener

public void addStreamingServiceListener(StreamingServiceListener listener)
Add an additional StreamingServiceListener to receive the event notifications. To receive all the initial events the first StreamingServiceListener should be added while #initialize(StreamingServiceListener) StreamingService.


removeStreamingServiceListener

public void removeStreamingServiceListener(StreamingServiceListener listener)
Removes an already added ConfereneServiceListener. To prevent loss of any event notification it is advised to have atleast one StreamingServiceListener