AS/400 Toolbox for Java \ Access classes \ AS400 object \ SecureAS/400 Class

Secure AS/400 Class

You can setup a secure AS/400 connection by creating an instance of a SecureAS400() object with or without prompting the user for sign-on information as indicated below:

The SecureAS400 class is a subclass of the AS400 class.

The following example shows you how to use CommandCall to send commands to the AS/400 system using a secure connection:

      // Create a secure AS400 object.  This is the only statement that changes
      // from the non-SSL case.
     SecureAS400 sys = new SecureAS400("mySystem.myCompany.com");

     // Create a command call object
     CommandCall cmd = new CommandCall(sys, "myCommand");
 
     // Run the commands.  A secure connection is made when the
     // command is run.  All the information that passes between the
     // client and server is encrypted.
     cmd.run();

For more information, see secure sockets layer.


[ Information Center Home Page | Feedback ] [ Legal | AS/400 Glossary ]