Class Condition
- java.lang.Object
- 
- rocks.xmpp.core.stream.model.errors.Condition
 
- 
- Direct Known Subclasses:
- SeeOtherHost
 
 public abstract class Condition extends Object An abstract implementation of a defined stream error condition.All conditions are immutable. - See Also:
- 4.9.3. Defined Stream Error Conditions
 
- 
- 
Field SummaryFields Modifier and Type Field Description static ConditionBAD_FORMATThe implementation of the<bad-format/>stream error.static ConditionBAD_NAMESPACE_PREFIXThe implementation of the<bad-namespace-prefix/>stream error.static ConditionCONFLICTThe implementation of the<conflict/>stream error.static ConditionCONNECTION_TIMEOUTThe implementation of the<connection-timeout/>stream error.static ConditionHOST_GONEThe implementation of the<host-gone/>stream error.static ConditionHOST_UNKNOWNThe implementation of the<host-unknown/>stream error.static ConditionIMPROPER_ADDRESSINGThe implementation of the<improper-addressing/>stream error.static ConditionINTERNAL_SERVER_ERRORThe implementation of the<internal-server-error/>stream error.static ConditionINVALID_FROMThe implementation of the<invalid-from/>stream error.static ConditionINVALID_NAMESPACEThe implementation of the<invalid-namespace/>stream error.static ConditionINVALID_XMLThe implementation of the<invalid-xml/>stream error.static ConditionNOT_AUTHORIZEDThe implementation of the<not-authorized/>stream error.static ConditionNOT_WELL_FORMEDThe implementation of the<not-well-formed/>stream error.static ConditionPOLICY_VIOLATIONThe implementation of the<policy-violation/>stream error.static ConditionREMOTE_CONNECTION_FAILEDThe implementation of the<remote-connection-failed/>stream error.static ConditionRESETThe implementation of the<reset/>stream error.static ConditionRESOURCE_CONSTRAINTThe implementation of the<resource-constraint/>stream error.static ConditionRESTRICTED_XMLThe implementation of the<restricted-xml/>stream error.static ConditionSYSTEM_SHUTDOWNThe implementation of the<system-shutdown/>stream error.static ConditionUNDEFINED_CONDITIONThe implementation of the<undefined-condition/>stream error.static ConditionUNSUPPORTED_ENCODINGThe implementation of the<unsupported-encoding/>stream error.static ConditionUNSUPPORTED_FEATUREThe implementation of the<unsupported-feature/>stream error.static ConditionUNSUPPORTED_STANZA_TYPEThe implementation of the<unsupported-stanza-type/>stream error.static ConditionUNSUPPORTED_VERSIONThe implementation of the<unsupported-version/>stream error.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SeeOtherHostseeOtherHost(String otherHost)Creates the<see-other-host/>stream error.StringtoString()
 
- 
- 
- 
Field Detail- 
BAD_FORMATpublic static final Condition BAD_FORMAT The implementation of the<bad-format/>stream error.The entity has sent XML that cannot be processed. 
 - 
BAD_NAMESPACE_PREFIXpublic static final Condition BAD_NAMESPACE_PREFIX The implementation of the<bad-namespace-prefix/>stream error.The entity has sent a namespace prefix that is unsupported, or has sent no namespace prefix on an element that needs such a prefix. 
 - 
CONFLICTpublic static final Condition CONFLICT The implementation of the<conflict/>stream error.The server either (1) is closing the existing stream for this entity because a new stream has been initiated that conflicts with the existing stream, or (2) is refusing a new stream for this entity because allowing the new stream would conflict with an existing stream (e.g., because the server allows only a certain number of connections from the same IP address or allows only one server-to-server stream for a given domain pair as a way of helping to ensure in-order processing as described under Section 10.1). 
 - 
CONNECTION_TIMEOUTpublic static final Condition CONNECTION_TIMEOUT The implementation of the<connection-timeout/>stream error.One party is closing the stream because it has reason to believe that the other party has permanently lost the ability to communicate over the stream. The lack of ability to communicate can be discovered using various methods, such as whitespace keepalives as specified under Section 4.4, XMPP-level pings as defined in [XEP-0199], and XMPP Stream Management as defined in [XEP-0198]. 
 - 
HOST_GONEpublic static final Condition HOST_GONE The implementation of the<host-gone/>stream error.The value of the 'to' attribute provided in the initial stream header corresponds to an FQDN that is no longer serviced by the receiving entity. 
 - 
HOST_UNKNOWNpublic static final Condition HOST_UNKNOWN The implementation of the<host-unknown/>stream error.The value of the 'to' attribute provided in the initial stream header does not correspond to an FQDN that is serviced by the receiving entity. 
 - 
IMPROPER_ADDRESSINGpublic static final Condition IMPROPER_ADDRESSING The implementation of the<improper-addressing/>stream error.A stanza sent between two servers lacks a 'to' or 'from' attribute, the 'from' or 'to' attribute has no value, or the value violates the rules for XMPP addresses. 
 - 
INTERNAL_SERVER_ERRORpublic static final Condition INTERNAL_SERVER_ERROR The implementation of the<internal-server-error/>stream error.4.9.3.8. internal-server-error The server has experienced a misconfiguration or other internal error that prevents it from servicing the stream. 
 - 
INVALID_FROMpublic static final Condition INVALID_FROM The implementation of the<invalid-from/>stream error.The data provided in a 'from' attribute does not match an authorized Jid or validated domain as negotiated (1) between two servers using SASL or Server Dialback, or (2) between a client and a server via SASL authentication and resource binding. 
 - 
INVALID_NAMESPACEpublic static final Condition INVALID_NAMESPACE The implementation of the<invalid-namespace/>stream error.The stream namespace name is something other than "http://etherx.jabber.org/streams" (see Section 11.2) or the content namespace declared as the default namespace is not supported (e.g., something other than "jabber:client" or "jabber:server"). 
 - 
INVALID_XMLpublic static final Condition INVALID_XML The implementation of the<invalid-xml/>stream error.The entity has sent invalid XML over the stream to a server that performs validation (see Section 11.4). 
 - 
NOT_AUTHORIZEDpublic static final Condition NOT_AUTHORIZED The implementation of the<not-authorized/>stream error.The entity has attempted to send XML stanzas or other outbound 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 data before sending the stream error. 
 - 
NOT_WELL_FORMEDpublic static final Condition NOT_WELL_FORMED The implementation of the<not-well-formed/>stream error.The initiating entity has sent XML that violates the well-formedness rules of [XML] or [XML-NAMES]. 
 - 
POLICY_VIOLATIONpublic static final Condition POLICY_VIOLATION The implementation of the<policy-violation/>stream error.The entity has violated some local service policy (e.g., a stanza exceeds a configured size limit); the server MAY choose to specify the policy in the <text/>element or in an application-specific condition element.
 - 
REMOTE_CONNECTION_FAILEDpublic static final Condition REMOTE_CONNECTION_FAILED The implementation of the<remote-connection-failed/>stream error.4.9.3.15. remote-connection-failed The server is unable to properly connect to a remote entity that is needed for authentication or authorization (e.g., in certain scenarios related to Server Dialback [XEP-0220]); this condition is not to be used when the cause of the error is within the administrative domain of the XMPP service provider, in which case the <internal-server-error/>condition is more appropriate.
 - 
RESETpublic static final Condition RESET The implementation of the<reset/>stream error.The server is closing the stream because it has new (typically security-critical) features to offer, because the keys or certificates used to establish a secure context for the stream have expired or have been revoked during the life of the stream (Section 13.7.2.3), because the TLS sequence number has wrapped (Section 5.3.5), etc. The reset applies to the stream and to any security context established for that stream (e.g., via TLS and SASL), which means that encryption and authentication need to be negotiated again for the new stream (e.g., TLS session resumption cannot be used). 
 - 
RESOURCE_CONSTRAINTpublic static final Condition RESOURCE_CONSTRAINT The implementation of the<resource-constraint/>stream error.The server lacks the system resources necessary to service the stream. 
 - 
RESTRICTED_XMLpublic static final Condition RESTRICTED_XML The implementation of the<restricted-xml/>stream error.The entity has attempted to send restricted XML features such as a comment, processing instruction, DTD subset, or XML entity reference (see Section 11.1). 
 - 
SYSTEM_SHUTDOWNpublic static final Condition SYSTEM_SHUTDOWN The implementation of the<system-shutdown/>stream error.The server is being shut down and all active streams are being statusChanged. 
 - 
UNDEFINED_CONDITIONpublic static final Condition UNDEFINED_CONDITION The implementation of the<undefined-condition/>stream error.The error condition is not one of those defined by the other conditions in this list; this error condition SHOULD NOT be used except in conjunction with an application-specific condition. 
 - 
UNSUPPORTED_ENCODINGpublic static final Condition UNSUPPORTED_ENCODING The implementation of the<unsupported-encoding/>stream error.4.9.3.22. unsupported-encoding The initiating entity has encoded the stream in an encoding that is not supported by the server (see Section 11.6) or has otherwise improperly encoded the stream (e.g., by violating the rules of the [UTF-8] encoding). 
 - 
UNSUPPORTED_FEATUREpublic static final Condition UNSUPPORTED_FEATURE The implementation of the<unsupported-feature/>stream error.The receiving entity has advertised a mandatory-to-negotiate stream feature that the initiating entity does not support, and has offered no other mandatory-to-negotiate feature alongside the unsupported feature. 
 - 
UNSUPPORTED_STANZA_TYPEpublic static final Condition UNSUPPORTED_STANZA_TYPE The implementation of the<unsupported-stanza-type/>stream error.4.9.3.24. unsupported-stanza-type The initiating entity has sent a first-level child of the stream that is not supported by the server, either because the receiving entity does not understand the namespace or because the receiving entity does not understand the element name for the applicable namespace (which might be the content namespace declared as the default namespace). 
 - 
UNSUPPORTED_VERSIONpublic static final Condition UNSUPPORTED_VERSION The implementation of the<unsupported-version/>stream error.The 'version' attribute provided by the initiating entity in the stream header specifies a version of XMPP that is not supported by the server. 
 
- 
 - 
Method Detail- 
seeOtherHostpublic static SeeOtherHost seeOtherHost(String otherHost) Creates the<see-other-host/>stream error.The server will not provide service to the initiating entity but is redirecting traffic to another host under the administrative control of the same service provider. The XML character data of the <see-other-host/>element returned by the server MUST specify the alternate FQDN or IP address at which to connect, which MUST be a valid domainpart or a domainpart plus port number (separated by the ':' character in the form "domainpart:port"). If the domainpart is the same as the source domain, derived domain, or resolved IPv4 or IPv6 address to which the initiating entity originally connected (differing only by the port number), then the initiating entity SHOULD simply attempt to reconnect at that address. (The format of an IPv6 address MUST follow [IPv6-ADDR], which includes the enclosing the IPv6 address in square brackets '[' and ']' as originally defined by [URI].) Otherwise, the initiating entity MUST resolve the FQDN specified in the<see-other-host/>element as described under Section 3.2.- Parameters:
- otherHost- The other host.
- Returns:
- The error.
 
 
- 
 
-