Class StartTls

  • All Implemented Interfaces:
    Comparable<StreamFeature>, StreamElement

    public final class StartTls
    extends StreamFeature
    implements StreamElement
    Represents the STARTTLS feature and initiates the TLS negotiation process.

    5.4.2.1. STARTTLS Command

    In order to begin the STARTTLS negotiation, the initiating entity issues the STARTTLS command (i.e., a <starttls/> element qualified by the 'urn:ietf:params:xml:ns:xmpp-tls' namespace) to instruct the receiving entity that it wishes to begin a STARTTLS negotiation to secure the stream.

    This class is unconditionally thread-safe.

    • Constructor Detail

      • StartTls

        public StartTls()
      • StartTls

        public StartTls​(boolean required)
    • Method Detail

      • isMandatory

        public final boolean isMandatory()
        Description copied from class: StreamFeature
        Indicates, whether this feature is mandatory to negotiate. By default a feature is not mandatory. Override this method for mandatory-to-negotiate features.
        Overrides:
        isMandatory in class StreamFeature
        Returns:
        True, if the feature is mandatory.
      • setMandatory

        public final void setMandatory​(boolean mandatory)
      • getPriority

        public final int getPriority()
        Description copied from class: StreamFeature
        Gets the priority of the feature, i.e. when it will be negotiated during feature negotiation.
        Overrides:
        getPriority in class StreamFeature
        Returns:
        The priority.
      • requiresRestart

        public final boolean requiresRestart()
        Description copied from class: StreamFeature
        If this feature requires a stream restart after it has been negotiated.
        Overrides:
        requiresRestart in class StreamFeature
        Returns:
        True, if a stream restart is required.