|
Wildfire 3.1.1 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jivesoftware.wildfire.net.SocketReader
org.jivesoftware.wildfire.net.ConnectionMultiplexerSocketReader
public class ConnectionMultiplexerSocketReader
A SocketReader specialized for connection manager connections. Connection managers may have one or more connections to the server. Each connection will have its own instance of this class. Each connection will send packets, sent from clients connected to the connection manager, to the server. Moreover, the server will use any of the available connections to the connection manager to send packets to connected clients through the connection manager.
Each socket reader has its own thread pool to process many packets in parallel. The thread pool by default will use 10 core threads, a queue of 50 elements and a max number of 100 threads. The pool will use the 10 core threads in parallel and queue packets. When the queue is full then more threads will be created until the max number is reached. Any created thread that exceeds the core number of threads will be killed when idle for 1 minute. The thread pool configuration can be modified by setting the system properties:
SessionManager
but not in RoutingTable
.
Field Summary |
---|
Fields inherited from class org.jivesoftware.wildfire.net.SocketReader |
---|
connection, open, serverName, session |
Constructor Summary | |
---|---|
ConnectionMultiplexerSocketReader(PacketRouter router,
RoutingTable routingTable,
String serverName,
Socket socket,
SocketConnection connection,
boolean useBlockingMode)
|
Method Summary | |
---|---|
protected void |
processIQ(IQ packet)
Process the received IQ packet. |
protected void |
processMessage(Message packet)
Process the received Message packet. |
protected void |
processPresence(Presence packet)
Process the received Presence packet. |
protected void |
shutdown()
Notification message indicating that the SocketReader is shutting down. |
Methods inherited from class org.jivesoftware.wildfire.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 ConnectionMultiplexerSocketReader(PacketRouter router, RoutingTable routingTable, String serverName, Socket socket, SocketConnection connection, boolean useBlockingMode)
Method Detail |
---|
protected void processIQ(IQ packet) throws UnauthorizedException
SocketReader
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 SocketReader
packet
- the received packet.
UnauthorizedException
protected void processMessage(Message packet) throws UnauthorizedException
SocketReader
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 SocketReader
packet
- the received packet.
UnauthorizedException
protected void processPresence(Presence packet) throws UnauthorizedException
SocketReader
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 SocketReader
packet
- the received packet.
UnauthorizedException
protected void shutdown()
SocketReader
shutdown
in class SocketReader
|
Wildfire 3.1.1 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |