Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.protocol.jabber.extensions.jingle
Class EncryptionPacketExtension

java.lang.Object
  extended by net.java.sip.communicator.impl.protocol.jabber.extensions.AbstractPacketExtension
      extended by net.java.sip.communicator.impl.protocol.jabber.extensions.jingle.EncryptionPacketExtension
All Implemented Interfaces:
org.jivesoftware.smack.packet.PacketExtension

public class EncryptionPacketExtension
extends AbstractPacketExtension

The element transporting encryption information during jingle session establishment.

Author:
Emil Ivov

Field Summary
static String ELEMENT_NAME
          The name of the "encryption" element.
static String NAMESPACE
          The namespace of the "encryption" element.
static String REQUIRED_ATTR_NAME
          The name of the required attribute.
 
Fields inherited from class net.java.sip.communicator.impl.protocol.jabber.extensions.AbstractPacketExtension
attributes
 
Constructor Summary
EncryptionPacketExtension()
          Creates a new instance of this EncryptionPacketExtension.
 
Method Summary
 void addCrypto(CryptoPacketExtension crypto)
          Adds a new crypto element to this encryption element.
 List<? extends org.jivesoftware.smack.packet.PacketExtension> getChildExtensions()
          Returns a list containing all crypto sub-elements.
 List<CryptoPacketExtension> getCryptoList()
          Returns a reference to the list of crypto elements that we have registered with this encryption element so far.
 boolean isRequired()
          Returns true if encryption is required for this session and false otherwise.
 void setRequired(boolean required)
          Specifies whether encryption is required for this session or not.
 
Methods inherited from class net.java.sip.communicator.impl.protocol.jabber.extensions.AbstractPacketExtension
addChildExtension, getAttribute, getAttributeAsInt, getAttributeAsInt, getAttributeAsString, getAttributeAsURI, getAttributeNames, getChildExtensionsOfType, getElementName, getFirstChildOfType, getNamespace, getText, removeAttribute, setAttribute, setNamespace, setText, toXML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAMESPACE

public static final String NAMESPACE
The namespace of the "encryption" element.


ELEMENT_NAME

public static final String ELEMENT_NAME
The name of the "encryption" element.

See Also:
Constant Field Values

REQUIRED_ATTR_NAME

public static final String REQUIRED_ATTR_NAME
The name of the required attribute.

See Also:
Constant Field Values
Constructor Detail

EncryptionPacketExtension

public EncryptionPacketExtension()
Creates a new instance of this EncryptionPacketExtension.

Method Detail

addCrypto

public void addCrypto(CryptoPacketExtension crypto)
Adds a new crypto element to this encryption element.

Parameters:
crypto - the new crypto element to add.

getCryptoList

public List<CryptoPacketExtension> getCryptoList()
Returns a reference to the list of crypto elements that we have registered with this encryption element so far.

Returns:
a reference to the list of crypto elements that we have registered with this encryption element so far.

setRequired

public void setRequired(boolean required)
Specifies whether encryption is required for this session or not.

Parameters:
required - true if encryption is required for this session and false otherwise.

isRequired

public boolean isRequired()
Returns true if encryption is required for this session and false otherwise. Default value is false.

Returns:
true if encryption is required for this session and false otherwise.

getChildExtensions

public List<? extends org.jivesoftware.smack.packet.PacketExtension> getChildExtensions()
Returns a list containing all crypto sub-elements.

Overrides:
getChildExtensions in class AbstractPacketExtension
Returns:
a List containing all our crypto sub-elements.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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