The SSLServer Class
The SSLServer class creates a socket server and then listens for connections from clients. This class behaves much as a standard socket server implementation would in relation to the socket connection. It listens for a connection, and when a connection is received, it spawns a new thread to manage the connection. The thread started is an instance of the OrderRequestProcessor class, as shown previously. This class manages the details of the communication protocol and uses an instance of the OrderProcessing class to process the request.
A single instance member is declared for an SSLServerSocketFactory reference. As we will see shortly, the constructor performs the task of creating this reference.
Within the main program block, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access