Package org.jitsi.impl.neomedia.protocol
Class SourceStreamDelegate<T extends javax.media.protocol.SourceStream>
- java.lang.Object
-
- org.jitsi.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.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:
- Lyubomir Marinov
-
-
Constructor Summary
Constructors Constructor Description SourceStreamDelegate(T stream)Initializes a new SourceStreamDelegate instance which is to wrap a specific SourceStream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanendOfStream()ImplementsSourceStream.endOfStream().javax.media.protocol.ContentDescriptorgetContentDescriptor()ImplementsSourceStream.getContentDescriptor().longgetContentLength()ImplementsSourceStream.getContentLength().ObjectgetControl(String controlType)ImplementsControls.getControl(String).Object[]getControls()ImplementsControls.getControls().
-
-
-
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()
ImplementsSourceStream.endOfStream(). Delegates to the wrapped SourceStream.- Specified by:
endOfStreamin interfacejavax.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()
ImplementsSourceStream.getContentDescriptor(). Delegates to the wrapped SourceStream.- Specified by:
getContentDescriptorin interfacejavax.media.protocol.SourceStream- Returns:
- a ContentDescriptor which describes the content made available by the wrapped SourceStream
-
getContentLength
public long getContentLength()
ImplementsSourceStream.getContentLength(). Delegates to the wrapped SourceStream.- Specified by:
getContentLengthin interfacejavax.media.protocol.SourceStream- Returns:
- the length of the content made available by the wrapped SourceStream
-
getControl
public Object getControl(String controlType)
ImplementsControls.getControl(String). Delegates to the wrapped SourceStream.- Specified by:
getControlin interfacejavax.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()
ImplementsControls.getControls(). Delegates to the wrapped SourceStream.- Specified by:
getControlsin interfacejavax.media.Controls- Returns:
- an array of Objects which represent the controls available for the wrapped SourceStream
-
-