下面列出了怎么用javax.naming.ReferralException的API类实例代码及写法,或者点击链接到github查看源代码。
public DelegatingLdapContext wrapReferralContextObtaining(ReferralException e) throws NamingException {
ClassLoader previous = setSocketFactory();
try {
return new DelegatingLdapContext((DirContext) e.getReferralContext(), socketFactory);
} finally {
unsetSocketFactory(previous);
}
}