/** * Creates a new XMPPException with the stream error that was the root case of the * exception. When a stream error is received from the server then the underlying connection * will be closed by the server. * * @param streamError the root cause of the exception. */ public StreamErrorException(StreamError streamError) { super(streamError.getCondition().toString() + " You can read more about the meaning of this stream error at http://xmpp.org/rfcs/rfc6120.html#streams-error-conditions\n" + streamError.toString()); this.streamError = streamError; }
@Override public XmlStringBuilder toXML(String enclosingNamespace) { XmlStringBuilder xml = new XmlStringBuilder(); xml.openElement(ELEMENT); xml.halfOpenElement(condition.toString()).xmlnsAttribute(NAMESPACE).closeEmptyElement(); addDescriptiveTextsAndExtensions(xml); xml.closeElement(ELEMENT); return xml; }
/** * Creates a new XMPPException with the stream error that was the root case of the * exception. When a stream error is received from the server then the underlying connection * will be closed by the server. * * @param streamError the root cause of the exception. */ public StreamErrorException(StreamError streamError) { super(streamError.getCondition().toString() + " You can read more about the meaning of this stream error at http://xmpp.org/rfcs/rfc6120.html#streams-error-conditions\n" + streamError.toString()); this.streamError = streamError; }
@Override public XmlStringBuilder toXML(String enclosingNamespace) { XmlStringBuilder xml = new XmlStringBuilder(); xml.openElement(ELEMENT); xml.halfOpenElement(condition.toString()).xmlnsAttribute(NAMESPACE).closeEmptyElement(); addDescriptiveTextsAndExtensions(xml); xml.closeElement(ELEMENT); return xml; }