Package org.jitsi.impl.neomedia.control
Class ReadOnlyBufferControlDelegate
- java.lang.Object
-
- org.jitsi.impl.neomedia.control.ReadOnlyBufferControlDelegate
-
- All Implemented Interfaces:
javax.media.Control,javax.media.control.BufferControl
public class ReadOnlyBufferControlDelegate extends Object implements javax.media.control.BufferControl
Represents a wrapper of a specific BufferControl which does not call the setters of the wrapped instance and calls only the getters.- Author:
- Lubomir Marinov
-
-
Constructor Summary
Constructors Constructor Description ReadOnlyBufferControlDelegate(javax.media.control.BufferControl bufferControl)Initializes a new ReadOnlyBufferControlDelegate instance which is to wrap a specific BufferControl and call only its getters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetBufferLength()ImplementsBufferControl.getBufferLength().ComponentgetControlComponent()ImplementsControl.getControlComponent().booleangetEnabledThreshold()ImplementsBufferControl.getEnabledThreshold().longgetMinimumThreshold()ImplementsBufferControl.getMinimumThreshold().longsetBufferLength(long bufferLength)ImplementsBufferControl.setBufferLength(long).voidsetEnabledThreshold(boolean enabledThreshold)ImplementsBufferControl.setEnabledThreshold(boolean).longsetMinimumThreshold(long minimumThreshold)ImplementsBufferControl.setMinimumThreshold(long).
-
-
-
Constructor Detail
-
ReadOnlyBufferControlDelegate
public ReadOnlyBufferControlDelegate(javax.media.control.BufferControl bufferControl)
Initializes a new ReadOnlyBufferControlDelegate instance which is to wrap a specific BufferControl and call only its getters.- Parameters:
bufferControl- the BufferControl to be wrapped by the new instance
-
-
Method Detail
-
getBufferLength
public long getBufferLength()
ImplementsBufferControl.getBufferLength(). Gets the length in milliseconds of the buffering performed by the owner of the wrapped BufferControl.- Specified by:
getBufferLengthin interfacejavax.media.control.BufferControl- Returns:
- the length in milliseconds of the buffering performed by the owner of the wrapped BufferControl
-
getControlComponent
public Component getControlComponent()
ImplementsControl.getControlComponent(). Gets the UI Component representing this instance and exported by the owner of the wrapped BufferControl.- Specified by:
getControlComponentin interfacejavax.media.Control- Returns:
- the UI Component representing the wrapped BufferControl and exported by its owner if such a Component is available; otherwise, null
-
getEnabledThreshold
public boolean getEnabledThreshold()
ImplementsBufferControl.getEnabledThreshold(). Gets the indicator of the wrapped BufferControl which determines whether threshold calculations are enabled.- Specified by:
getEnabledThresholdin interfacejavax.media.control.BufferControl- Returns:
- true if threshold calculations are enabled in the wrapped BufferControl; otherwise, false
-
getMinimumThreshold
public long getMinimumThreshold()
ImplementsBufferControl.getMinimumThreshold(). Gets the minimum threshold in milliseconds for the buffering performed by the owner of the wrapped BufferControl.- Specified by:
getMinimumThresholdin interfacejavax.media.control.BufferControl- Returns:
- the minimum threshold in milliseconds for the buffering performed by the owner of the wrapped BufferControl
-
setBufferLength
public long setBufferLength(long bufferLength)
ImplementsBufferControl.setBufferLength(long). Ignores the request because this instance provides read-only support and returns the value actually in effect.- Specified by:
setBufferLengthin interfacejavax.media.control.BufferControl- Parameters:
bufferLength- the length in milliseconds of the buffering to be performed by the owner of the wrapped BufferControl- Returns:
- the length in milliseconds of the buffering performed by the owner of the wrapped BufferControl that is actually in effect
-
setEnabledThreshold
public void setEnabledThreshold(boolean enabledThreshold)
ImplementsBufferControl.setEnabledThreshold(boolean). Ignores the set request because this instance provides read-only support.- Specified by:
setEnabledThresholdin interfacejavax.media.control.BufferControl- Parameters:
enabledThreshold- true if threshold calculations are to be enabled; otherwise, false
-
setMinimumThreshold
public long setMinimumThreshold(long minimumThreshold)
ImplementsBufferControl.setMinimumThreshold(long). Ignores the set request because this instance provides read-only support and returns the value actually in effect.- Specified by:
setMinimumThresholdin interfacejavax.media.control.BufferControl- Parameters:
minimumThreshold- the minimum threshold in milliseconds for the buffering to be performed by the owner of the wrapped BufferControl- Returns:
- the minimum threshold in milliseconds for the buffering performed by the owner of the wrapped BufferControl that is actually in effect
-
-