public abstract class SignonHandlerAdapter extends java.lang.Object implements SignonHandler
Extend this class to create a SignonHandler implementation and override the methods for the events of interest. (If you directly implement the SignonHandler interface, you must provide implementations for all of the SignonHandler methods. The SignonHandlerAdapter class provides default implementations for all SignonHandler methods, so you only have to implement methods for events you care about.)
Create a SignonHandler object using your extended class, and then register it with the system object using setSignonHandler()
. When a sign-on related event occurs on the AS400 system object, the relevant method in your handler object is invoked.
For all methods that return a boolean, returning true indicates that the sign-on should proceed; false indicates that the sign-on should be terminated.
In order to avoid hang conditions, the SignonHandler object must not attempt to display a GUI if isGuiAvailable()
indicates false.
In order to avoid infinite loops, a SignonHandler must not call the following AS400 methods:
Constructor and Description |
---|
SignonHandlerAdapter() |
Modifier and Type | Method and Description |
---|---|
boolean |
connectionInitiated(SignonEvent event,
boolean forceUpdate)
Returns true, indicating that the sign-on should proceed.
|
void |
exceptionOccurred(SignonEvent event)
Rethrows the exception.
|
boolean |
passwordAboutToExpire(SignonEvent event,
int daysUntilExpiration)
Returns true, indicating that the sign-on should proceed.
|
boolean |
passwordExpired(SignonEvent event)
Returns false, indicating that the sign-on should not proceed.
|
boolean |
passwordIncorrect(SignonEvent event)
Returns false, indicating that the sign-on should not proceed.
|
boolean |
passwordLengthIncorrect(SignonEvent event)
Returns false, indicating that the sign-on should not proceed.
|
boolean |
passwordMissing(SignonEvent event)
Returns false, indicating that the sign-on should not proceed.
|
boolean |
systemNameMissing(SignonEvent event)
Returns false, indicating that the sign-on should not proceed.
|
boolean |
systemNameUnknown(SignonEvent event,
java.net.UnknownHostException exc)
Returns false, indicating that the sign-on should not proceed.
|
boolean |
userIdAboutToBeDisabled(SignonEvent event)
Returns false, indicating that the sign-on should not proceed.
|
boolean |
userIdDefaultAlreadyAssigned(SignonEvent event,
java.lang.String defaultUser)
Returns true, indicating that the sign-on should proceed.
|
boolean |
userIdDisabled(SignonEvent event)
Returns false, indicating that the sign-on should not proceed.
|
boolean |
userIdLengthIncorrect(SignonEvent event)
Returns false, indicating that the sign-on should not proceed.
|
boolean |
userIdMissing(SignonEvent event)
Returns false, indicating that the sign-on should not proceed.
|
boolean |
userIdUnknown(SignonEvent event)
Returns false, indicating that the sign-on should not proceed.
|
public boolean connectionInitiated(SignonEvent event, boolean forceUpdate)
connectionInitiated
in interface SignonHandler
event
- The sign-on event.forceUpdate
- true indicates that the sign-on information is known to be incomplete or incorrect. false indicates that the information may be correct.EventObject.getSource()
public void exceptionOccurred(SignonEvent event) throws AS400SecurityException
exceptionOccurred
in interface SignonHandler
event
- The sign-on event.AS400SecurityException
- If the handler cannot handle the exception.AS400SecurityException.getReturnCode()
public boolean passwordAboutToExpire(SignonEvent event, int daysUntilExpiration)
passwordAboutToExpire
in interface SignonHandler
event
- The sign-on event.daysUntilExpiration
- The number of days until the password expires.AS400.changePassword(java.lang.String, java.lang.String)
public boolean passwordExpired(SignonEvent event)
passwordExpired
in interface SignonHandler
event
- The sign-on event.AS400.changePassword(java.lang.String, java.lang.String)
public boolean passwordIncorrect(SignonEvent event)
passwordIncorrect
in interface SignonHandler
event
- The sign-on event.AS400.setPassword(java.lang.String)
public boolean passwordLengthIncorrect(SignonEvent event)
passwordLengthIncorrect
in interface SignonHandler
event
- The sign-on event.AS400.setPassword(java.lang.String)
public boolean passwordMissing(SignonEvent event)
passwordMissing
in interface SignonHandler
event
- The sign-on event.AS400.setPassword(java.lang.String)
public boolean systemNameMissing(SignonEvent event)
systemNameMissing
in interface SignonHandler
event
- The sign-on event.AS400.setSystemName(java.lang.String)
public boolean systemNameUnknown(SignonEvent event, java.net.UnknownHostException exc)
systemNameUnknown
in interface SignonHandler
event
- The sign-on event.exc
- The exception.AS400.setSystemName(java.lang.String)
public boolean userIdDefaultAlreadyAssigned(SignonEvent event, java.lang.String defaultUser)
userIdDefaultAlreadyAssigned
in interface SignonHandler
event
- The sign-on event.defaultUser
- The current default user.AS400.isUseDefaultUser()
,
AS400.setUseDefaultUser(boolean)
,
AS400.setDefaultUser(java.lang.String, java.lang.String)
public boolean userIdAboutToBeDisabled(SignonEvent event)
userIdAboutToBeDisabled
in interface SignonHandler
event
- The sign-on event.AS400.setUserId(java.lang.String)
,
AS400.setPassword(java.lang.String)
public boolean userIdDisabled(SignonEvent event)
userIdDisabled
in interface SignonHandler
event
- The sign-on event.AS400.setUserId(java.lang.String)
public boolean userIdLengthIncorrect(SignonEvent event)
userIdLengthIncorrect
in interface SignonHandler
event
- The sign-on event.AS400.setUserId(java.lang.String)
public boolean userIdMissing(SignonEvent event)
userIdMissing
in interface SignonHandler
event
- The sign-on event.AS400.setUserId(java.lang.String)
public boolean userIdUnknown(SignonEvent event)
userIdUnknown
in interface SignonHandler
event
- The sign-on event.AS400.setUserId(java.lang.String)