Openfire 3.9.3 Javadoc

org.jivesoftware.openfire.net
Class ServerStanzaHandler

java.lang.Object
  extended by org.jivesoftware.openfire.net.StanzaHandler
      extended by org.jivesoftware.openfire.net.ServerStanzaHandler

public class ServerStanzaHandler
extends StanzaHandler

Handler of XML stanzas sent by remote servers. Remote servers that send stanzas with no TO or FROM will get their connections closed. Moreover, remote servers that try to send stanzas from a not validated domain will also get their connections closed.

Server-to-server communication requires two TCP connections between the servers where one is used for sending packets whilst the other connection is used for receiving packets. The connection used for receiving packets will use a ServerStanzaHandler since the other connection will not receive packets.

TODO Finish migration of s2s to use NIO instead of blocking threads. Migrate from ServerSocketReader.

Author:
Gaston Dombiak

Field Summary
 
Fields inherited from class org.jivesoftware.openfire.net.StanzaHandler
CHARSET, connection, serverName, session
 
Constructor Summary
ServerStanzaHandler(PacketRouter router, String serverName, Connection connection)
           
 
Method Summary
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.
 
Methods inherited from class org.jivesoftware.openfire.net.StanzaHandler
createSession, getAddress, process
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerStanzaHandler

public ServerStanzaHandler(PacketRouter router,
                           String serverName,
                           Connection connection)
Method Detail

processIQ

protected void processIQ(org.xmpp.packet.IQ packet)
                  throws UnauthorizedException
Description copied from class: StanzaHandler
Process the received IQ packet. Registered PacketInterceptor 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 class StanzaHandler
Parameters:
packet - the received packet.
Throws:
UnauthorizedException - if service is not available to sender.

processPresence

protected void processPresence(org.xmpp.packet.Presence packet)
                        throws UnauthorizedException
Description copied from class: StanzaHandler
Process the received Presence packet. Registered PacketInterceptor 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 class StanzaHandler
Parameters:
packet - the received packet.
Throws:
UnauthorizedException - if service is not available to sender.

processMessage

protected void processMessage(org.xmpp.packet.Message packet)
                       throws UnauthorizedException
Description copied from class: StanzaHandler
Process the received Message packet. Registered PacketInterceptor 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 class StanzaHandler
Parameters:
packet - the received packet.
Throws:
UnauthorizedException - if service is not available to sender.

Openfire 3.9.3 Javadoc

Copyright © 2003-2008 Jive Software.