Class ClientStanzaHandler
- Direct Known Subclasses:
WebSocketClientStanzaHandler
By default, the hostname specified in the stream header sent by clients will not be validated. When validated the TO attribute of the stream header has to match the server name or a valid subdomain. If the value of the 'to' attribute is not valid then a host-unknown error will be returned. To enable the validation set the system property xmpp.client.validate.host to true.
- Author:
- Gaston Dombiak
-
Field Summary
Fields inherited from class org.jivesoftware.openfire.net.StanzaHandler
connection, PROPERTY_OVERWRITE_EMPTY_TO, router, saslStatus, session, sessionCreated, startedSASL, startedTLS, waitingCompressionACK
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
createSession
(String serverName, org.xmlpull.v1.XmlPullParser xpp, Connection connection) protected org.dom4j.Namespace
protected void
processIQ
(org.xmpp.packet.IQ packet) Process the received IQ packet.protected void
processMessage
(org.xmpp.packet.Message packet) Process the received Message packet.protected void
processPresence
(org.xmpp.packet.Presence packet) Process the received Presence packet.protected boolean
processUnknowPacket
(org.dom4j.Element doc) protected void
startTLS()
protected boolean
protected boolean
Methods inherited from class org.jivesoftware.openfire.net.StanzaHandler
closeNeverEncryptedConnection, compressClient, compressionSuccessful, createSession, getAddress, getStreamHeader, initiateSession, isEndOfStream, isHostUnknown, isStartOfStream, isStreamManagementStanza, negotiateTLS, process, processStanza, saslSuccessful, setSession, tlsNegotiated
-
Constructor Details
-
ClientStanzaHandler
-
-
Method Details
-
processUnknowPacket
protected boolean processUnknowPacket(org.dom4j.Element doc) -
getNamespace
protected org.dom4j.Namespace getNamespace() -
validateHost
protected boolean validateHost() -
validateJIDs
protected boolean validateJIDs() -
createSession
protected void createSession(String serverName, org.xmlpull.v1.XmlPullParser xpp, Connection connection) throws org.xmlpull.v1.XmlPullParserException - Throws:
org.xmlpull.v1.XmlPullParserException
-
processIQ
Description copied from class:StanzaHandler
Process the received IQ packet. RegisteredPacketInterceptor
will be invoked before and after the packet was routed.Subclasses may redefine this method for different reasons such as modifying the sender of the packet to avoid spoofing, rejecting the packet or even process the packet in another thread.
- Overrides:
processIQ
in classStanzaHandler
- Parameters:
packet
- the received packet.- Throws:
UnauthorizedException
- if service is not available to sender.
-
processPresence
Description copied from class:StanzaHandler
Process the received Presence packet. RegisteredPacketInterceptor
will be invoked before and after the packet was routed.Subclasses may redefine this method for different reasons such as modifying the sender of the packet to avoid spoofing, rejecting the packet or even process the packet in another thread.
- Overrides:
processPresence
in classStanzaHandler
- Parameters:
packet
- the received packet.- Throws:
UnauthorizedException
- if service is not available to sender.
-
processMessage
Description copied from class:StanzaHandler
Process the received Message packet. RegisteredPacketInterceptor
will be invoked before and after the packet was routed.Subclasses may redefine this method for different reasons such as modifying the sender of the packet to avoid spoofing, rejecting the packet or even process the packet in another thread.
- Overrides:
processMessage
in classStanzaHandler
- Parameters:
packet
- the received packet.- Throws:
UnauthorizedException
- if service is not available to sender.
-
startTLS
- Throws:
Exception
-