JAINTM MGCP API (DRAFT FOR PUBLIC REVIEW) - Version 0.9 - 16 NOVEMBER 2000

jain.protocol.ip.mgcp.message.parms
Class GainControl

java.lang.Object
  |
  +--jain.protocol.ip.mgcp.message.parms.LocalOptionValue
        |
        +--jain.protocol.ip.mgcp.message.parms.GainControl
All Implemented Interfaces:
java.io.Serializable

public final class GainControl
extends LocalOptionValue
implements java.io.Serializable

Specifies the value for gain control (or "auto" if automatic gain control is to be used).

See Also:
Serialized Form

Fields inherited from class jain.protocol.ip.mgcp.message.parms.LocalOptionValue
BANDWIDTH, COMPRESSION_ALGORITHM, ECHO_CANCELLATION, ENCRYPTION_METHOD, GAIN_CONTROL, LOCAL_OPTION_EXTENSION, PACKETIZATION_PERIOD, RESOURCE_RESERVATION, SILENCE_SUPPRESSION, TYPE_OF_NETWORK, TYPE_OF_SERVICE
 
Constructor Summary
GainControl()
          Constructs a new GainControl object in which automatic gain control is assumed.
GainControl(int gainControl)
          Constructs a new GainControl object in which a gain control value is specified.
 
Method Summary
 int getGainControl()
          Gets the gain control value.
 boolean getGainControlAuto()
          Indicates whether gain control is set to "auto."
 java.lang.String toString()
          Returns a String of the form "gc:<gainControl>" where gainControl is either an integer value or the word "auto."
 
Methods inherited from class jain.protocol.ip.mgcp.message.parms.LocalOptionValue
getBandwidthLowerBound, getBandwidthUpperBound, getCompressionAlgorithmNames, getEchoCancellation, getEncryptionMethod, getLocalOptionExtensionName, getLocalOptionValueType, getPacketizationPeriodLowerBound, getPacketizationPeriodUpperBound, getResourceReservation, getSilenceSuppression, getTypeOfNetwork, getTypeOfService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GainControl

public GainControl()
Constructs a new GainControl object in which automatic gain control is assumed.

GainControl

public GainControl(int gainControl)
Constructs a new GainControl object in which a gain control value is specified.
Parameters:
gainControl - The positive or negative value for gain control. Must be in the range -9999 to 9999.
Throws:
java.lang.IllegalArgumentException - Thrown if the gain control value is not in the specified range.
Method Detail

getGainControl

public int getGainControl()
Gets the gain control value. If gain control is set to "auto," this method will return zero.
Overrides:
getGainControl in class LocalOptionValue
Returns:
The gain control value.

getGainControlAuto

public boolean getGainControlAuto()
Indicates whether gain control is set to "auto."
Returns:
If gain control is "auto," returns true; otherwise, returns false.

toString

public java.lang.String toString()
Returns a String of the form "gc:<gainControl>" where gainControl is either an integer value or the word "auto."
Overrides:
toString in class java.lang.Object

JAINTM MGCP API (DRAFT FOR PUBLIC REVIEW) - Version 0.9 - 16 NOVEMBER 2000

Copyright © 2000 Sun Microsystems, Inc.