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