hypercast
Class StreamManager

java.lang.Object
  |
  +--hypercast.StreamManager
All Implemented Interfaces:
I_ReceiveCallback

public class StreamManager
extends java.lang.Object
implements I_ReceiveCallback

This class provides methods to allow the application to join a streaming group, leave a streaming group, send/receive stream within the group.


Constructor Summary
StreamManager(hypercast.OL_Socket socket)
           
 
Method Summary
 hypercast.HCastInputStream acceptInputStream()
          get the available inputstream with no specified stream id iterate through the hashtable find and return the first stream that has not been assigned to the application if no stream or all stream have been assigned, block until new stream arrives
 hypercast.HCastInputStream acceptInputStream(int sid)
          get the available inputstream with specified stream id
 hypercast.HCastOutputStream getOutputStream()
          get the HCastOutputSteam to write bytes to with no specified stream id
 hypercast.HCastOutputStream getOutputStream(int sid)
          get the HCastOutputSteam to write bytes to with the specified stream id (integer)
 void ReceiveCallback(hypercast.I_OverlayMessage message)
          The method called each time a message arrives at the overlay socket.
 void setNotificationHandler(hypercast.NotificationHandler notificationHandler)
          Sets the notification handler that is used to pass events from the message store to an application.
 void timerExpired(java.lang.Object time_id)
          The time to periodically check the sending status of each stream
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamManager

public StreamManager(hypercast.OL_Socket socket)
Method Detail

setNotificationHandler

public void setNotificationHandler(hypercast.NotificationHandler notificationHandler)
Sets the notification handler that is used to pass events from the message store to an application.


ReceiveCallback

public void ReceiveCallback(hypercast.I_OverlayMessage message)
The method called each time a message arrives at the overlay socket.

Specified by:
ReceiveCallback in interface I_ReceiveCallback

getOutputStream

public hypercast.HCastOutputStream getOutputStream(int sid)
get the HCastOutputSteam to write bytes to with the specified stream id (integer)

Parameters:
sid - in string format
Returns:
HCastOutputstream

getOutputStream

public hypercast.HCastOutputStream getOutputStream()
get the HCastOutputSteam to write bytes to with no specified stream id

Returns:
HCastOutputstream

acceptInputStream

public hypercast.HCastInputStream acceptInputStream(int sid)
get the available inputstream with specified stream id

Parameters:
sid - streamid in stream format
Returns:
Inputstream

acceptInputStream

public hypercast.HCastInputStream acceptInputStream()
get the available inputstream with no specified stream id iterate through the hashtable find and return the first stream that has not been assigned to the application if no stream or all stream have been assigned, block until new stream arrives

Returns:
HCastInputstream

timerExpired

public void timerExpired(java.lang.Object time_id)
The time to periodically check the sending status of each stream