Package org.jivesoftware.openfire
Class SessionPacketRouter
- java.lang.Object
-
- org.jivesoftware.openfire.SessionPacketRouter
-
- All Implemented Interfaces:
PacketRouter
- Direct Known Subclasses:
StreamManagementPacketRouter
public class SessionPacketRouter extends Object implements PacketRouter
Handles the routing of packets to a particular session. It will invoke all of the appropriate interceptors, before and after having the server process the message.- Author:
- Alexander Wenckus
-
-
Field Summary
Fields Modifier and Type Field Description protected LocalClientSessionsession
-
Constructor Summary
Constructors Constructor Description SessionPacketRouter(LocalClientSession session)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidroute(org.dom4j.Element wrappedElement)voidroute(org.xmpp.packet.IQ packet)Routes the given IQ packet.voidroute(org.xmpp.packet.Message packet)Routes the given Message packet.voidroute(org.xmpp.packet.Packet packet)Routes the given packet based on its type.voidroute(org.xmpp.packet.Presence packet)Routes the given Presence packet.voidsetSkipJIDValidation(boolean skipJIDValidation)Sets if TO addresses of Elements being routed should be validated.
-
-
-
Field Detail
-
session
protected LocalClientSession session
-
-
Constructor Detail
-
SessionPacketRouter
public SessionPacketRouter(LocalClientSession session)
-
-
Method Detail
-
setSkipJIDValidation
public void setSkipJIDValidation(boolean skipJIDValidation)
Sets if TO addresses of Elements being routed should be validated. Doing stringprep operations is very expensive and sometimes we already validated the TO address so there is no need to validate again the address. For instance, when using Connection Managers the validation is done by the Connection Manager so we can just trust the TO address. On the other hand, the FROM address is set by the server so there is no need to validate it.By default validation is enabled.
- Parameters:
skipJIDValidation- true if validation of TO address is enabled.
-
route
public void route(org.dom4j.Element wrappedElement) throws UnknownStanzaException- Throws:
UnknownStanzaException
-
route
public void route(org.xmpp.packet.Packet packet)
Description copied from interface:PacketRouterRoutes the given packet based on its type.- Specified by:
routein interfacePacketRouter- Parameters:
packet- The packet to route.
-
route
public void route(org.xmpp.packet.IQ packet)
Description copied from interface:PacketRouterRoutes the given IQ packet.- Specified by:
routein interfacePacketRouter- Parameters:
packet- The packet to route.
-
route
public void route(org.xmpp.packet.Message packet)
Description copied from interface:PacketRouterRoutes the given Message packet.- Specified by:
routein interfacePacketRouter- Parameters:
packet- The packet to route.
-
route
public void route(org.xmpp.packet.Presence packet)
Description copied from interface:PacketRouterRoutes the given Presence packet.- Specified by:
routein interfacePacketRouter- Parameters:
packet- The packet to route.
-
-