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

Get J2EE™ and Beyond: Design, Develop, and Deploy World-Class Java™ Software now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.