public class ServerSocketReader extends SocketReader
The received packets will be routed using another thread to ensure that many received packets
could be routed at the same time. To avoid creating new threads every time a packet is received
each ServerSocketReader instance uses a ThreadPoolExecutor
. By default the
maximum number of threads that the executor may have is 50. However, this value may be modified
by changing the property xmpp.server.processing.max.threads.
connection, open, serverName, session
Constructor and Description |
---|
ServerSocketReader(PacketRouter router,
RoutingTable routingTable,
String serverName,
Socket socket,
SocketConnection connection,
boolean useBlockingMode) |
Modifier and Type | Method and Description |
---|---|
String |
getExtraNamespaces() |
protected void |
processIQ(org.xmpp.packet.IQ packet)
Processes the packet in another thread if the packet has not been rejected.
|
protected void |
processMessage(org.xmpp.packet.Message packet)
Processes the packet in another thread if the packet has not been rejected.
|
protected void |
processPresence(org.xmpp.packet.Presence packet)
Processes the packet in another thread if the packet has not been rejected.
|
protected boolean |
processUnknowPacket(org.dom4j.Element doc)
Remote servers may send subsequent db:result packets so we need to process them in order
to validate new domains.
|
protected void |
shutdown()
Notification message indicating that the SocketReader is shutting down.
|
createSession, process, run
public ServerSocketReader(PacketRouter router, RoutingTable routingTable, String serverName, Socket socket, SocketConnection connection, boolean useBlockingMode)
protected void processIQ(org.xmpp.packet.IQ packet) throws UnauthorizedException
processIQ
in class SocketReader
packet
- the received packet.UnauthorizedException
- if the connection required security but was not secured.protected void processPresence(org.xmpp.packet.Presence packet) throws UnauthorizedException
processPresence
in class SocketReader
packet
- the received packet.UnauthorizedException
- if the connection required security but was not secured.protected void processMessage(org.xmpp.packet.Message packet) throws UnauthorizedException
processMessage
in class SocketReader
packet
- the received packet.UnauthorizedException
- if the connection required security but was not secured.protected boolean processUnknowPacket(org.dom4j.Element doc)
doc
- the unknown DOM element that was receivedprotected void shutdown()
SocketReader
shutdown
in class SocketReader
public String getExtraNamespaces()
getExtraNamespaces
in class SocketReader
Copyright © 2003-2008 Jive Software.