Class SRPSocketHandler


  • public class SRPSocketHandler
    extends java.lang.Object
    The SRPSocketHandler manages the asynchronous processing of an SRPSocket. the SRPSocketManager allows less threads to be used for processing then when each thread had its own thread. Depending on the system this could save a lot of processing and switching time. The each SRPSocketHandler has one selector thread which checks for each of the sockets it is managing whether or not there is data. If so, it will schedule that data to be processed. When an SRPSocket is created, it requests an SRPSocketHandler. If the each socket handler has its maximum number of sockets, a new SRPSocketHandler will be created. The ratio between SocketHandlers and sockets must be defined. Also the maximum number of threads per pool. All these settings may influence the performance of the server.
    • Constructor Detail

      • SRPSocketHandler

        public SRPSocketHandler​(int threadPoolSize)
    • Method Detail

      • socketCount

        public int socketCount()
      • terminate

        public void terminate()