/** Gets the referral that could not be processed. * * @see <a href="../../../../api/com/novell/ldap/LDAPReferralException.html#getFailedReferral()"> com.novell.ldap.LDAPReferralException.getFailedReferral()</a> */ public String getFailedReferral() { return exception.getFailedReferral(); }
public LDAPEntry next() throws LDAPException { if (empty) return null; this.wasRead = true; if (this.lastread != null) { if (lastread instanceof LDAPSearchResultReference) { LDAPReferralException ref = new LDAPReferralException("Referral",LDAPException.REFERRAL,"Referral encountered "); ref.setReferrals(((LDAPSearchResultReference) lastread).getReferrals()); throw ref; } return ((LDAPSearchResult) this.lastread).getEntry(); } else { return null; } }
/** * Gets the list of referrals (LDAP URLs to other servers) returned by * the LDAP server. * * @see <a href="../../../../api/com/novell/ldap/LDAPReferralException.html#getReferrals()"> com.novell.ldap.LDAPReferralException.getReferrals()</a> */ public String[] getReferrals() { return exception.getReferrals(); }
LDAPReferralException rex = new LDAPReferralException( ExceptionMessages.REFERENCE_NOFOLLOW); rex.setReferrals( refs); throw rex; } else LDAPReferralException rex = new LDAPReferralException( ExceptionMessages.REFERENCE_ERROR, lr.getException()); rex.setReferrals(ri.getReferralList()); rex.setFailedReferral( ri.getReferralUrl().toString()); throw rex;
logger.error("Could not follow referral: {}", e.getFailedReferral()); logger.debug("Error encountered trying to follow referral.", e); throw new GuacamoleServerException("Could not follow LDAP referral.", e); logger.warn("Given a referral, but referrals are disabled. Error was: {}", e.getMessage()); logger.debug("Got a referral, but configured to not follow them.", e);
/** * Constructs a default exception with no specific error information. * * @see <a href="../../../../api/com/novell/ldap/LDAPReferralException.html#LDAPReferralException()"> com.novell.ldap.LDAPReferralException.LDAPReferralException()</a> */ public LDAPReferralException() { super( new com.novell.ldap.LDAPReferralException()); exception = (com.novell.ldap.LDAPReferralException) super.getWrappedObject(); return; }
/** * Sets a referral that could not be processed * * @see <a href="../../../../api/com/novell/ldap/LDAPReferralException.html#setFailedReferral(java.lang.String)"> com.novell.ldap.LDAPReferralException.setFailedReferral(String)</a> */ public void setFailedReferral( String url) { exception.setFailedReferral( url); return; } }
msg = getExceptionString("LDAPReferralException");
} catch(InterThreadException ex) { LDAPReferralException rex = new LDAPReferralException( ExceptionMessages.REFERRAL_SEND, LDAPException.CONNECT_ERROR, null, ex); rex.setReferrals( initialReferrals); ReferralInfo ref=rconn.getConnection().getActiveReferral(); rex.setFailedReferral( ref.getReferralUrl().toString()); throw rex; LDAPReferralException rex = new LDAPReferralException( ExceptionMessages.REFERRAL_ERROR, ex); rex.setReferrals( refs); if( rinfo != null) { rex.setFailedReferral( rinfo.getReferralUrl().toString()); } else { rex.setFailedReferral( refs[refs.length - 1]);
/** * Constructs a default exception with a specified string as additional * information. * * @see <a href="../../../../api/com/novell/ldap/LDAPReferralException.html#LDAPReferralException(java.lang.String)"> com.novell.ldap.LDAPReferralException.LDAPReferralException( String)</a> */ public LDAPReferralException(String message) { super( new com.novell.ldap.LDAPReferralException(message)); exception = (com.novell.ldap.LDAPReferralException) super.getWrappedObject(); return; }
LDAPReferralException rex = new LDAPReferralException( ExceptionMessages.REFERRAL_ERROR); rex.setReferrals( referrals); throw rex; LDAPReferralException rex = new LDAPReferralException( ExceptionMessages.REFERRAL_ERROR, ldapex); rex.setReferrals(referrals); rex.setFailedReferral( referrals[referrals.length-1]); throw rex;
ex = new LDAPReferralException( "Automatic referral following not enabled", LDAPException.REFERRAL, getErrorMessage()); ((LDAPReferralException)ex).setReferrals( refs); break; default: // Everything else
/** * * Constructs an exception with a specified error string, result code, and * an error message from the server. * * @see <a href="../../../../api/com/novell/ldap/LDAPReferralException.html#LDAPReferralException(java.lang.String, int, java.lang.String)"> com.novell.ldap.LDAPReferralException.LDAPReferralException( String, int, String)</a> */ public LDAPReferralException(String message, int resultCode, String serverMessage) { super(new com.novell.ldap.LDAPReferralException( message, resultCode, serverMessage)); exception = (com.novell.ldap.LDAPReferralException) super.getWrappedObject(); return; }
/** * Constructs a default exception with a specified string as additional * information and an exception that indicates a failure to follow a * referral. * * @see <a href="../../../../api/com/novell/ldap/LDAPReferralException.html#LDAPReferralException(java.lang.String, java.lang.Throwable)"> com.novell.ldap.LDAPReferralException.LDAPReferralException( String, Throwable)</a> */ public LDAPReferralException(String message, Throwable rootException) { super(new com.novell.ldap.LDAPReferralException(message,rootException)); exception = (com.novell.ldap.LDAPReferralException) super.getWrappedObject(); return; }
/** * * Constructs an exception with a specified error string, result code, * an error message from the server, and an exception that indicates * a failure to follow a referral. * * @see <a href="../../../../api/com/novell/ldap/LDAPReferralException.html#LDAPReferralException(java.lang.String, int, java.lang.String, java.lang.Throwable)"> com.novell.ldap.LDAPReferralException.LDAPReferralException( String, int, String, Throwable)</a> */ public LDAPReferralException(String message, int resultCode, String serverMessage, Throwable rootException) { super( new com.novell.ldap.LDAPReferralException( message, resultCode, serverMessage, rootException)); exception = (com.novell.ldap.LDAPReferralException) super.getWrappedObject(); return; }
public com.novell.ldap.LDAPConnection bind( String[] ldapurl, com.novell.ldap.LDAPConnection conn) throws com.novell.ldap.LDAPReferralException { LDAPConnection newconn; try { newconn = ref.bind( ldapurl, new LDAPConnection(conn)); if( newconn == null) { return (com.novell.ldap.LDAPConnection)null; } return newconn.getWrappedObject(); } catch( LDAPReferralException rex) { throw (com.novell.ldap.LDAPReferralException) rex.getWrappedObject(); } catch( Throwable ex) { throw new com.novell.ldap.LDAPReferralException( ex.toString(), ex); } } }