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

JSSE Code Sample

The following code sample builds on a socket-based application developed with the java.net package. The application accepts special orders for a fictitious movie store. Since the special order can be made using a credit card number and can be made over the Internet, the communication channel should be secure.

The server and client use a protocol specified in a Request class, as shown below. This class defines several request types that may be sent to the server and responses that will be returned from the server. The Request object will contain an integer type member that will indicate the type of request being sent and a String member that will contain the contents of the message. Public get and set methods are available to ...

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