Authenticator authenticator = null;
if ( authenticatorBean instanceof DelegatingAuthenticatorBean )
{
authenticator = new DelegatingAuthenticator();
( ( DelegatingAuthenticator ) authenticator )
.setDelegateHost( ( ( DelegatingAuthenticatorBean ) authenticatorBean ).getDelegateHost() );
( ( DelegatingAuthenticator ) authenticator )
.setDelegatePort( ( ( DelegatingAuthenticatorBean ) authenticatorBean ).getDelegatePort() );
}