All Packages Class Hierarchy This Package Previous Next Index
Class com.ibm.as400.security.auth.ProfileHandleCredential
java.lang.Object
|
+----com.ibm.as400.security.auth.AS400Credential
|
+----com.ibm.as400.security.auth.ProfileHandleCredential
- public final class ProfileHandleCredential
- extends AS400Credential
The ProfileHandleCredential class represents an AS/400 profile handle.
This credential does not support all possible behavior
for AS/400 profile handles. It is provided to fill a secondary
role in support of other credentials when running on the
local AS/400 system. A profile handle credential provides the ability
to store the current OS/400 thread identity and restore that
identity after performing a swap based on another
credential (i.e. ProfileTokenCredential).
- See Also:
- AS400Credential, ProfileTokenCredential
-
HANDLE_LENGTH
- Indicates the length of a profile handle (in bytes)
-
ProfileHandleCredential()
- Constructs a ProfileHandleCredential object.
-
equals(Object)
- Compares the specified Object with the credential
for equality.
-
getHandle()
- Returns the actual bytes for the handle as it exists
on the AS/400 system.
-
hashCode()
- Returns a hash code for this credential.
-
setHandle()
- Sets the handle based on the current OS/400 thread identity.
-
setHandle(byte[])
- Sets the actual bytes for the handle as it exists
on the AS/400 system.
HANDLE_LENGTH
public static int HANDLE_LENGTH
- Indicates the length of a profile handle (in bytes)
ProfileHandleCredential
public ProfileHandleCredential()
- Constructs a ProfileHandleCredential object.
equals
public boolean equals(Object o)
- Compares the specified Object with the credential
for equality.
- Parameters:
- o
- Object to be compared for equality.
- Returns:
- true if equal; otherwise false.
- Overrides:
- equals in class Object
getHandle
public byte[] getHandle()
- Returns the actual bytes for the handle as it exists
on the AS/400 system.
- Returns:
- The handle bytes; null if not set.
hashCode
public int hashCode()
- Returns a hash code for this credential.
- Returns:
- a hash code for this credential.
- Overrides:
- hashCode in class Object
setHandle
public void setHandle() throws PropertyVetoException, AS400SecurityException
- Sets the handle based on the current OS/400 thread identity.
The system property must be set prior to
invoking this method.
If successful, this method results in a new profile
handle being created on the AS/400 system.
This property cannot be changed once a request
initiates a connection for the object to the
AS/400 system.
- Throws: AS400SecurityException
- If an AS/400 security or authentication error occurs.
- Throws: PropertyVetoException
- If the change is vetoed.
- Throws: ExtendedIllegalStateException
- If the token cannot be initialized due
to the current state.
setHandle
public void setHandle(byte bytes[]) throws PropertyVetoException
- Sets the actual bytes for the handle as it exists
on the AS/400 system.
This method allows a credential to be constructed
based on an existing handle (i.e. previously created using the
QSYGETPH system API).
This property cannot be changed once a request
initiates a connection for the object to the
AS/400 system.
- Parameters:
- bytes
- The handle bytes.
- Throws: PropertyVetoException
- If the change is vetoed.
- Throws: ExtendedIllegalArgumentException
- If the provided value exceeds the maximum
allowed length.
- Throws: ExtendedIllegalStateException
- If the property cannot be changed due
to the current state.
All Packages Class Hierarchy This Package Previous Next Index