public class ServerStanzaHandler extends StanzaHandler
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.
CHARSET, connection, serverName, session
Constructor and Description |
---|
ServerStanzaHandler(PacketRouter router,
String serverName,
Connection connection) |
Modifier and Type | Method and Description |
---|---|
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.
|
createSession, getAddress, process
public ServerStanzaHandler(PacketRouter router, String serverName, Connection connection)
protected void processIQ(org.xmpp.packet.IQ packet) throws UnauthorizedException
StanzaHandler
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.
processIQ
in class StanzaHandler
packet
- the received packet.UnauthorizedException
- if service is not available to sender.protected void processPresence(org.xmpp.packet.Presence packet) throws UnauthorizedException
StanzaHandler
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.
processPresence
in class StanzaHandler
packet
- the received packet.UnauthorizedException
- if service is not available to sender.protected void processMessage(org.xmpp.packet.Message packet) throws UnauthorizedException
StanzaHandler
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.
processMessage
in class StanzaHandler
packet
- the received packet.UnauthorizedException
- if service is not available to sender.Copyright © 2003-2008 Jive Software.