public Subclass withIAMTokenRefresh ( double offset ) { this . iamTokenRefreshOffset = offset ; if ( ( offset > 0 ) && ( this . credentials . getCredentials ( ) instanceof IBMOAuthCredentials ) && ( ( IBMOAuthCredentials ) this . credentials . getCredentials ( ) ) . getTokenManager ( ) instanceof DefaultTokenManager ) { ( ( DefaultTokenManager ) ( ( IBMOAuthCredentials ) this . credentials . getCredentials ( ) ) . getTokenManager ( ) ) . setIamRefreshOffset ( iamTokenRefreshOffset ) ; } return getSubclass ( ) ; }
Sets the time offset used for IAM token refresh by the DefaultTokenManager . This should only be over written for a dev or staging environment