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

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

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

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

Specifies the encryption method (and key).

See Also:
Serialized Form

Field Summary
static int BASE64
          Signifies "base64" encryption method.
static int CLEAR
          Signifies "clear" encryption method.
static int URI
          Signifies "uri" encryption method.
 
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
EncryptionMethod(int encryptionMethod, java.lang.String encryptionKey)
          Constructs a new EncryptionMethod object.
 
Method Summary
 java.lang.String getEncryptionKey()
          Gets the encryption key.
 int getEncryptionMethod()
          Gets the encryption method.
 java.lang.String toString()
          Returns a String of the form "k:<encryptionMethod>:<encryptionKey>"
 
Methods inherited from class jain.protocol.ip.mgcp.message.parms.LocalOptionValue
getBandwidthLowerBound, getBandwidthUpperBound, getCompressionAlgorithmNames, getEchoCancellation, getGainControl, 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
 

Field Detail

BASE64

public static final int BASE64
Signifies "base64" encryption method.

CLEAR

public static final int CLEAR
Signifies "clear" encryption method.

URI

public static final int URI
Signifies "uri" encryption method.
Constructor Detail

EncryptionMethod

public EncryptionMethod(int encryptionMethod,
                        java.lang.String encryptionKey)
                 throws java.lang.IllegalArgumentException
Constructs a new EncryptionMethod object.
Parameters:
encryptionMethod - One of the permitted encryption methods: CLEAR; BASE64; URI. Note: RFC 2705 includes the "prompt" method in its specification with the note that this method is not usable in MGCP. Thus, "prompt" is excluded as a permissible value in JAIN MGCP.
encryptionKey - A String that contains the encryption key.
Throws:
java.lang.IllegalArgumentException - Thrown if:
  1. Encryption method is other than the three permitted values: CLEAR; BASE64; or URI.
  2. Encryption method = CLEAR and the encryption key does not conform to the specification for such a key in RFC 2705.
  3. Encryption method = BASE64 and the encryption key is not an encoded encryption key according to RFC 2705.
  4. Encryption method = URI and the encryption key is not a "URItoObtainKey" as defined in RFC 2705.
Method Detail

getEncryptionKey

public java.lang.String getEncryptionKey()
Gets the encryption key.
Returns:
The encryption key, as a String.

getEncryptionMethod

public int getEncryptionMethod()
Gets the encryption method.
Overrides:
getEncryptionMethod in class LocalOptionValue
Returns:
One of the values: CLEAR; BASE64; or URI.

toString

public java.lang.String toString()
Returns a String of the form "k:<encryptionMethod>:<encryptionKey>"
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.