O'Reilly logo

J2EE™ and Beyond: Design, Develop, and Deploy World-Class Java™ Software by Art Taylor

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required