Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.neomedia.control
Class ReadOnlyBufferControlDelegate

java.lang.Object
  extended by net.java.sip.communicator.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

Field Summary
 
Fields inherited from interface javax.media.control.BufferControl
DEFAULT_VALUE, MAX_VALUE
 
Constructor Summary
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
 long getBufferLength()
          Implements BufferControl.getBufferLength().
 Component getControlComponent()
          Implements Control.getControlComponent().
 boolean getEnabledThreshold()
          Implements BufferControl.getEnabledThreshold().
 long getMinimumThreshold()
          Implements BufferControl.getMinimumThreshold().
 long setBufferLength(long bufferLength)
          Implements BufferControl.setBufferLength(long).
 void setEnabledThreshold(boolean enabledThreshold)
          Implements BufferControl.setEnabledThreshold(boolean).
 long setMinimumThreshold(long minimumThreshold)
          Implements BufferControl.setMinimumThreshold(long).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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()
Implements BufferControl.getBufferLength(). Gets the length in milliseconds of the buffering performed by the owner of the wrapped BufferControl.

Specified by:
getBufferLength in interface javax.media.control.BufferControl
Returns:
the length in milliseconds of the buffering performed by the owner of the wrapped BufferControl

getControlComponent

public Component getControlComponent()
Implements Control.getControlComponent(). Gets the UI Component representing this instance and exported by the owner of the wrapped BufferControl.

Specified by:
getControlComponent in interface javax.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()
Implements BufferControl.getEnabledThreshold(). Gets the indicator of the wrapped BufferControl which determines whether threshold calculations are enabled.

Specified by:
getEnabledThreshold in interface javax.media.control.BufferControl
Returns:
true if threshold calculations are enabled in the wrapped BufferControl; otherwise, false

getMinimumThreshold

public long getMinimumThreshold()
Implements BufferControl.getMinimumThreshold(). Gets the minimum threshold in milliseconds for the buffering performed by the owner of the wrapped BufferControl.

Specified by:
getMinimumThreshold in interface javax.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)
Implements BufferControl.setBufferLength(long). Ignores the request because this instance provides read-only support and returns the value actually in effect.

Specified by:
setBufferLength in interface javax.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)
Implements BufferControl.setEnabledThreshold(boolean). Ignores the set request because this instance provides read-only support.

Specified by:
setEnabledThreshold in interface javax.media.control.BufferControl
Parameters:
enabledThreshold - true if threshold calculations are to be enabled; otherwise, false

setMinimumThreshold

public long setMinimumThreshold(long minimumThreshold)
Implements BufferControl.setMinimumThreshold(long). Ignores the set request because this instance provides read-only support and returns the value actually in effect.

Specified by:
setMinimumThreshold in interface javax.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

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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