All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ibm.as400.access.AS400ImplNative Maven / Gradle / Ivy

The newest version!
///////////////////////////////////////////////////////////////////////////////
//                                                                             
// JTOpen (AS/400 Toolbox for Java - OSS version)                              
//                                                                             
// Filename: AS400ImplNative.java
//                                                                             
// The source code contained herein is licensed under the IBM Public License   
// Version 1.0, which has been approved by the Open Source Initiative.         
// Copyright (C) 1997-2000 International Business Machines Corporation and     
// others. All rights reserved.                                                
//                                                                             
///////////////////////////////////////////////////////////////////////////////

package com.ibm.as400.access;


class AS400ImplNative
{
    private static final String CLASSNAME = "com.ibm.as400.access.AS400ImplNative";
    static
    {
        if (Trace.traceOn_) Trace.logLoadPath(CLASSNAME);
    }

    static
    {
 	   NativeMethods.loadNativeLibraryQyjspart(); 
    }

    static native byte[] signonNative(byte[] userId) throws NativeException;
    /* Swap to a user profile using the userid and password */
    /* The swapToPH is the profile handle generated from the userid and passowrd */
    /* The swapFromPH is the profile handle to get back to the original profile handle */
    static native void swapToNative(byte[] userId, byte[] bytes, byte[] swapToPH, byte[] swapFromPH) throws NativeException;
    /* Swap using a profile handle and free the old handle */
    /* swapToPH is the old profile handle that will be released.  This handle will also be released. */
    /* swapFromPH is the profile to swap to */ 
    static native void swapBackNative(byte[] swapToPH, byte[] swapFromPH) throws NativeException;
    
    
    /* New method to create a profile handle.   This method is only available after IBM 7.5. 
     * The create profile handle should be used with SwapToProfileHandleNative to do the
     * swap.
     * This profile handle should be released when the AS400 object is closed */
    static native void createProfileHandleNative(byte[] profileHandle, String userId, char[] password, char[] additionalAuthenticationFactor) throws NativeException;

    /* Swap to the user associated with swapToPH.  The swapFromPH is the handle for the original user, */
    /* which is used with swapping back using swapBackAndReleaseNative */ 
    static native void swapToProfileHandleNative(byte[] swapToPH, byte[] swapFromPH) throws NativeException;

    /* Swap back to the original profile handle and free it */ 
    static native void swapBackAndReleaseNative(byte[] swapFromPH) throws NativeException;

    /* Create profile handle with additional authentication information. 
     * This method is only available after IBM 7.5. 
     * This profile handle should be released when the AS400 object is done with it.  */
    public static native void createProfileHandle2Native(byte[] profileHandle, 
    		String userId, char[] password, char[] additionalAuthenticationFactor,
    		String verificationId, String remoteIpAddress, int jRemotePort,   String localIpAddress, int jLocalPort ) throws NativeException;
    
    
  
    
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy