Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.neomedia.protocol
Class SourceStreamDelegate<T extends javax.media.protocol.SourceStream>

java.lang.Object
  extended by net.java.sip.communicator.impl.neomedia.protocol.SourceStreamDelegate<T>
Type Parameters:
T - the very type of the SourceStream wrapped by SourceStreamDelegate
All Implemented Interfaces:
javax.media.Controls, javax.media.protocol.SourceStream

public class SourceStreamDelegate<T extends javax.media.protocol.SourceStream>
extends Object
implements javax.media.protocol.SourceStream

Implements a SourceStream which wraps a specific SourceStream.

Author:
Lubomir Marinov

Field Summary
protected  T stream
          The SourceStreamDelegate wrapped by this instance.
 
Fields inherited from interface javax.media.protocol.SourceStream
LENGTH_UNKNOWN
 
Constructor Summary
SourceStreamDelegate(T stream)
          Initializes a new SourceStreamDelegate instance which is to wrap a specific SourceStream.
 
Method Summary
 boolean endOfStream()
          Implements SourceStream.endOfStream().
 javax.media.protocol.ContentDescriptor getContentDescriptor()
          Implements SourceStream.getContentDescriptor().
 long getContentLength()
          Implements SourceStream.getContentLength().
 Object getControl(String controlType)
          Implements Controls.getControl(String).
 Object[] getControls()
          Implements Controls.getControls().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

stream

protected final T extends javax.media.protocol.SourceStream stream
The SourceStreamDelegate wrapped by this instance.

Constructor Detail

SourceStreamDelegate

public SourceStreamDelegate(T stream)
Initializes a new SourceStreamDelegate instance which is to wrap a specific SourceStream.

Parameters:
stream - the SourceStream the new instance is to wrap
Method Detail

endOfStream

public boolean endOfStream()
Implements SourceStream.endOfStream(). Delegates to the wrapped SourceStream.

Specified by:
endOfStream in interface javax.media.protocol.SourceStream
Returns:
true if the wrapped SourceStream has reached the end the content it makes available

getContentDescriptor

public javax.media.protocol.ContentDescriptor getContentDescriptor()
Implements SourceStream.getContentDescriptor(). Delegates to the wrapped SourceStream.

Specified by:
getContentDescriptor in interface javax.media.protocol.SourceStream
Returns:
a ContentDescriptor which describes the content made available by the wrapped SourceStream

getContentLength

public long getContentLength()
Implements SourceStream.getContentLength(). Delegates to the wrapped SourceStream.

Specified by:
getContentLength in interface javax.media.protocol.SourceStream
Returns:
the length of the content made available by the wrapped SourceStream

getControl

public Object getControl(String controlType)
Implements Controls.getControl(String). Delegates to the wrapped SourceStream.

Specified by:
getControl in interface javax.media.Controls
Parameters:
controlType - a String value which specifies the type of the control to be retrieved
Returns:
an Object which represents the control of the wrapped SourceStream of the specified type if such a control is available; otherwise, null

getControls

public Object[] getControls()
Implements Controls.getControls(). Delegates to the wrapped SourceStream.

Specified by:
getControls in interface javax.media.Controls
Returns:
an array of Objects which represent the controls available for the wrapped SourceStream

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.