|
Openfire 3.3.2 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jivesoftware.openfire.net.SocketReader org.jivesoftware.openfire.net.ServerSocketReader
public class ServerSocketReader
A SocketReader specialized for server connections. This reader will be used when the open stream contains a jabber:server namespace. 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 ServerSocketReader since the other connection will not receive packets.
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.
Field Summary |
---|
Fields inherited from class org.jivesoftware.openfire.net.SocketReader |
---|
connection, open, serverName, session |
Constructor Summary | |
---|---|
ServerSocketReader(PacketRouter router,
RoutingTable routingTable,
String serverName,
Socket socket,
SocketConnection connection,
boolean useBlockingMode)
|
Method Summary | |
---|---|
protected void |
processIQ(IQ packet)
Processes the packet in another thread if the packet has not been rejected. |
protected void |
processMessage(Message packet)
Processes the packet in another thread if the packet has not been rejected. |
protected void |
processPresence(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. |
Methods inherited from class org.jivesoftware.openfire.net.SocketReader |
---|
createSession, process, run |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ServerSocketReader(PacketRouter router, RoutingTable routingTable, String serverName, Socket socket, SocketConnection connection, boolean useBlockingMode)
Method Detail |
---|
protected void processIQ(IQ packet) throws UnauthorizedException
processIQ
in class SocketReader
packet
- the received packet.
UnauthorizedException
protected void processPresence(Presence packet) throws UnauthorizedException
processPresence
in class SocketReader
packet
- the received packet.
UnauthorizedException
protected void processMessage(Message packet) throws UnauthorizedException
processMessage
in class SocketReader
packet
- the received packet.
UnauthorizedException
protected boolean processUnknowPacket(org.dom4j.Element doc)
doc
- the unknown DOM element that was received
protected void shutdown()
SocketReader
shutdown
in class SocketReader
|
Openfire 3.3.2 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |