Enum StreamError.Condition

java.lang.Object
java.lang.Enum<StreamError.Condition>
org.xmpp.packet.StreamError.Condition
All Implemented Interfaces:
Serializable, Comparable<StreamError.Condition>, java.lang.constant.Constable
Enclosing class:
StreamError

public static enum StreamError.Condition extends Enum<StreamError.Condition>
Type-safe enumeration for the error condition.

Implementation note: XMPP error conditions use "-" characters in their names such as "bad-request". Because "-" characters are not valid identifier parts in Java, they have been converted to "_" characters in the enumeration names, such as bad_request. The toXMPP() and fromXMPP(String) methods can be used to convert between the enumertation values and XMPP error code strings.

  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    The entity has sent XML that cannot be processed; this error MAY be used instead of the more specific XML-related errors, such as <bad-namespace-prefix/>, <invalid-xml/>, <restricted-xml/>, <unsupported-encoding/>, and <xml-not-well-formed/>, although the more specific errors are preferred.
    The entity has sent a namespace prefix that is unsupported, or has sent no namespace prefix on an element that requires such a prefix.
    The server is closing the active stream for this entity because a new stream has been initiated that conflicts with the existing stream.
    The entity has not generated any traffic over the stream for some period of time (configurable according to a local service policy).
    The value of the 'to' attribute provided by the initiating entity in the stream header corresponds to a hostname that is no longer hosted by the server.
    The value of the 'to' attribute provided by the initiating entity in the stream header does not correspond to a hostname that is hosted by the server.
    A stanza sent between two servers lacks a 'to' or 'from' attribute (or the attribute has no value).
    The server has experienced a misconfiguration or an otherwise-undefined internal error that prevents it from servicing the stream.
    The JID or hostname provided in a 'from' address does not match an authorized JID or validated domain negotiated between servers via SASL or dialback, or between a client and a server via authentication and resource binding.
    Deprecated.
    Removed from XMPP specification in RFC6120.
    the streams namespace name is something other than "http://etherx.jabber.org/streams" or the dialback namespace name is something other than "jabber:server:dialback".
    The entity has sent invalid XML over the stream to a server that performs validation.
    The entity has attempted to send data before the stream has been authenticated, or otherwise is not authorized to perform an action related to stream negotiation; the receiving entity MUST NOT process the offending stanza before sending the stream error.
    The initiating entity has sent XML that is not well-formed.
    The entity has violated some local service policy; the server MAY choose to specify the policy in the <text/> element or an application-specific condition element.
    The server is unable to properly connect to a remote entity that is required for authentication or authorization.
    The server lacks the system resources necessary to service the stream.
    The entity has attempted to send restricted XML features such as a comment, processing instruction, DTD, entity reference, or unescaped character.
    The server will not provide service to the initiating entity but is redirecting traffic to another host; the server SHOULD specify the alternate hostname or IP address (which MUST be a valid domain identifier) as the XML character data of the <see-other-host/> element.
    The server is being shut down and all active streams are being closed.
    The error condition is not one of those defined by the other conditions in this list; this error condition SHOULD be used only in conjunction with an application-specific condition.
    The initiating entity has encoded the stream in an encoding that is not supported by the server.
    The initiating entity has sent a first-level child of the stream that is not supported by the server.
    the value of the 'version' attribute provided by the initiating entity in the stream header specifies a version of XMPP that is not supported by the server; the server MAY specify the version(s) it supports in the <text/> element.
    Deprecated.
    Deprecated by RFC6120 in favor of "not_well_formed"
  • Method Summary

    Modifier and Type
    Method
    Description
    fromXMPP(String condition)
    Converts a String value into its Condition representation.
    Returns the error code as a valid XMPP error code string.
    Returns the enum constant of this type with the specified name.
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • bad_format

      public static final StreamError.Condition bad_format
      The entity has sent XML that cannot be processed; this error MAY be used instead of the more specific XML-related errors, such as <bad-namespace-prefix/>, <invalid-xml/>, <restricted-xml/>, <unsupported-encoding/>, and <xml-not-well-formed/>, although the more specific errors are preferred.
    • bad_namespace_prefix

      public static final StreamError.Condition bad_namespace_prefix
      The entity has sent a namespace prefix that is unsupported, or has sent no namespace prefix on an element that requires such a prefix.
    • conflict

      public static final StreamError.Condition conflict
      The server is closing the active stream for this entity because a new stream has been initiated that conflicts with the existing stream.
    • connection_timeout

      public static final StreamError.Condition connection_timeout
      The entity has not generated any traffic over the stream for some period of time (configurable according to a local service policy).
    • host_gone

      public static final StreamError.Condition host_gone
      The value of the 'to' attribute provided by the initiating entity in the stream header corresponds to a hostname that is no longer hosted by the server.
    • host_unknown

      public static final StreamError.Condition host_unknown
      The value of the 'to' attribute provided by the initiating entity in the stream header does not correspond to a hostname that is hosted by the server.
    • improper_addressing

      public static final StreamError.Condition improper_addressing
      A stanza sent between two servers lacks a 'to' or 'from' attribute (or the attribute has no value).
    • internal_server_error

      public static final StreamError.Condition internal_server_error
      The server has experienced a misconfiguration or an otherwise-undefined internal error that prevents it from servicing the stream.
    • invalid_from

      public static final StreamError.Condition invalid_from
      The JID or hostname provided in a 'from' address does not match an authorized JID or validated domain negotiated between servers via SASL or dialback, or between a client and a server via authentication and resource binding.
    • invalid_id

      @Deprecated public static final StreamError.Condition invalid_id
      Deprecated.
      Removed from XMPP specification in RFC6120.
      The stream ID or dialback ID is invalid or does not match an ID previously provided.
    • invalid_namespace

      public static final StreamError.Condition invalid_namespace
      the streams namespace name is something other than "http://etherx.jabber.org/streams" or the dialback namespace name is something other than "jabber:server:dialback".
    • invalid_xml

      public static final StreamError.Condition invalid_xml
      The entity has sent invalid XML over the stream to a server that performs validation.
    • not_authorized

      public static final StreamError.Condition not_authorized
      The entity has attempted to send data before the stream has been authenticated, or otherwise is not authorized to perform an action related to stream negotiation; the receiving entity MUST NOT process the offending stanza before sending the stream error.
    • policy_violation

      public static final StreamError.Condition policy_violation
      The entity has violated some local service policy; the server MAY choose to specify the policy in the <text/> element or an application-specific condition element.
    • remote_connection_failed

      public static final StreamError.Condition remote_connection_failed
      The server is unable to properly connect to a remote entity that is required for authentication or authorization.
    • resource_constraint

      public static final StreamError.Condition resource_constraint
      The server lacks the system resources necessary to service the stream.
    • restricted_xml

      public static final StreamError.Condition restricted_xml
      The entity has attempted to send restricted XML features such as a comment, processing instruction, DTD, entity reference, or unescaped character.
    • see_other_host

      public static final StreamError.Condition see_other_host
      The server will not provide service to the initiating entity but is redirecting traffic to another host; the server SHOULD specify the alternate hostname or IP address (which MUST be a valid domain identifier) as the XML character data of the <see-other-host/> element.
    • system_shutdown

      public static final StreamError.Condition system_shutdown
      The server is being shut down and all active streams are being closed.
    • undefined_condition

      public static final StreamError.Condition undefined_condition
      The error condition is not one of those defined by the other conditions in this list; this error condition SHOULD be used only in conjunction with an application-specific condition.
    • unsupported_encoding

      public static final StreamError.Condition unsupported_encoding
      The initiating entity has encoded the stream in an encoding that is not supported by the server.
    • unsupported_stanza_type

      public static final StreamError.Condition unsupported_stanza_type
      The initiating entity has sent a first-level child of the stream that is not supported by the server.
    • unsupported_version

      public static final StreamError.Condition unsupported_version
      the value of the 'version' attribute provided by the initiating entity in the stream header specifies a version of XMPP that is not supported by the server; the server MAY specify the version(s) it supports in the <text/> element.
    • xml_not_well_formed

      @Deprecated public static final StreamError.Condition xml_not_well_formed
      Deprecated.
      Deprecated by RFC6120 in favor of "not_well_formed"
      The initiating entity has sent XML that is not well-formed.
      See Also:
    • not_well_formed

      public static final StreamError.Condition not_well_formed
      The initiating entity has sent XML that is not well-formed.
  • Method Details

    • values

      public static StreamError.Condition[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static StreamError.Condition valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • fromXMPP

      public static StreamError.Condition fromXMPP(String condition)
      Converts a String value into its Condition representation.
      Parameters:
      condition - the String value.
      Returns:
      the condition corresponding to the String.
    • toXMPP

      public String toXMPP()
      Returns the error code as a valid XMPP error code string.
      Returns:
      the XMPP error code value.