/** * Constructs a default exception with no specific error information. * * @see <a href="../../../../api/com/novell/ldap/LDAPException.html#LDAPException()"> com.novell.ldap.LDAPException.LDAPException()</a> */ public LDAPException() { super(); exception = new com.novell.ldap.LDAPException(); return; }
public final RfcRequest dupRequest(String base, String filter, boolean reference) throws LDAPException { throw new LDAPException( ExceptionMessages.NO_DUP_REQUEST, new Object[] { "abandon" }, LDAPException.LDAP_NOT_SUPPORTED,(String)null); } public final String getRequestDN()
public final RfcRequest dupRequest(String base, String filter, boolean request) throws LDAPException { throw new LDAPException( ExceptionMessages.NO_DUP_REQUEST, new Object[] { "unbind" }, LDAPException.LDAP_NOT_SUPPORTED,(String)null); }
/** * Constructs an exception with a detailed message * String and the result code. * * @see <a href="../../../../api/com/novell/ldap/LDAPException.html#LDAPException(java.lang.String, int, java.lang.String)"> com.novell.ldap.LDAPException.LDAPException(String, int, String)</a> */ public LDAPException( String message, int resultCode, String serverMessage) { super(message); exception = new com.novell.ldap.LDAPException( message, resultCode, serverMessage); return; }
/** * Constructs an exception with a detailed message String, result code, * and a matchedDN returned from the server. * * @see <a href="../../../../api/com/novell/ldap/LDAPException.html#LDAPException(java.lang.String, int, java.lang.String, java.lang.String)"> com.novell.ldap.LDAPException.LDAPException(String, int, String, String)</a> */ public LDAPException( String message, int resultCode, String serverMessage, String matchedDN) { super(message); exception = new com.novell.ldap.LDAPException( message, resultCode, serverMessage, matchedDN); return; }
/** * Constructs an exception with a detailed message String, the * result code, and the root exception. * * @see <a href="../../../../api/com/novell/ldap/LDAPException.html#LDAPException(java.lang.String, int, java.lang.String, java.lang.Throwable)"> com.novell.ldap.LDAPException.LDAPException(String, int, String, Throwable)</a> */ public LDAPException( String message, int resultCode, String serverMessage, Throwable rootException) { super(message); exception = new com.novell.ldap.LDAPException( message,resultCode,serverMessage,rootException); return; }
throws LDAPException { if (attrNames.length != ascendingFlags.length){ throw new LDAPException( ExceptionMessages.UNEQUAL_LENGTHS, LDAPException.INAPPROPRIATE_MATCHING,(String)null);
/** * This method helps in registering the EdirEventIntermediateResponse * class with the LDAPIntermediateResponse. Actual registration code * is contained in EdirEventIntermediateResponse, which is excuted on * loading the same. * * @throws LDAPException When Class in Not Found. */ private void registerIntermediateResponses() throws LDAPException { try { //Load EdirEventIntermediateResponse Class //so that it can register its Oid. getClass().getClassLoader().loadClass( EdirEventIntermediateResponse.class.getName() ); } catch (ClassNotFoundException e) { ///CLOVER:OFF //Call it a Parameter Error with the message of Exception. throw new LDAPException( ExceptionMessages.PARAM_ERROR, LDAPException.LOCAL_ERROR, e.getMessage() ); ///CLOVER:ON } }
final void stopTLS() throws LDAPException { try{ this.stopReaderMessageID = this.STOP_READING; this.socket.close(); waitForReader(null); this.socket = this.nonTLSBackup; this.in = this.socket.getInputStream(); this.out = this.socket.getOutputStream(); if( Debug.LDAP_DEBUG) { Debug.trace( Debug.TLS, "connection.stopTLS, nonTLSBackup:"+ nonTLSBackup +", TLSSocket:"+socket+", input:"+ in +"," +"output:" +out ); } // Allow the new reader to start this.stopReaderMessageID = this.CONTINUE_READING; }catch (IOException ioe){ throw new LDAPException(ExceptionMessages.STOPTLS_ERROR, LDAPException.CONNECT_ERROR, null, ioe); }finally { this.nonTLSBackup = null; startReader(); } return; }
public LDAPDnsToX500DNRequest(String objectDN ) throws LDAPException { super(NamingContextConstants.LDAP_DNS_TO_X500_DN_EXTENDED_REQUEST, null); try { if (objectDN == null) throw new IllegalArgumentException(ExceptionMessages.PARAM_ERROR); else { // if the objectdn is not null then I need to process the dn ByteArrayOutputStream encodedData = new ByteArrayOutputStream(); LBEREncoder encoder = new LBEREncoder(); //Encode the data of objectDN ASN1OctetString asn1_objectDN = new ASN1OctetString(objectDN); asn1_objectDN.encode(encoder,encodedData ); // set the value of operation specific data setValue(encodedData.toByteArray()); } } catch(IOException ioe) { throw new LDAPException(ExceptionMessages.ENCODING_ERROR, LDAPException.ENCODING_ERROR,(String) null); } } }
throw new LDAPException(ExceptionMessages.ENCODING_ERROR, LDAPException.ENCODING_ERROR,(String) null);
/** * Default Constructor using a RFCLDAPMessage. * * @param message RFCLDAPMessage Object for constructing this message. * * @throws LDAPException When the decoding of the message fails, it * results in an LDAPException. */ public EdirEventIntermediateResponse(final RfcLDAPMessage message) throws LDAPException { super(message); try { //Process the BerCoded Response Value byte[] returnedValue = getValue(); processmessage(returnedValue); ///CLOVER:OFF } catch (IOException e) { if (Debug.LDAP_DEBUG) { Debug.trace( Debug.EventsCalls, "Exception in processing message:" + e.getMessage() ); } throw new LDAPException( ExceptionMessages.DECODING_ERROR, LDAPException.DECODING_ERROR, (String) e.getMessage() ); } ///CLOVER:ON }
throw new LDAPException(ExceptionMessages.ENCODING_ERROR, LDAPException.ENCODING_ERROR,(String)null);
throw new LDAPException(ExceptionMessages.ENCODING_ERROR, LDAPException.ENCODING_ERROR,(String)null);
public LburpStartRequest(String lburpProtocolOID) throws LDAPException { super(LburpConstants.LBURPStartReplReqOID, null); try { if ( (lburpProtocolOID == null) ) throw new IllegalArgumentException( ExceptionMessages.PARAM_ERROR); ByteArrayOutputStream encodedData = new ByteArrayOutputStream(); LBEREncoder encoder = new LBEREncoder(); ASN1Sequence asn1_lpSeq = new ASN1Sequence(); ASN1OctetString asn1_lpOID = new ASN1OctetString(lburpProtocolOID); asn1_lpSeq.add(asn1_lpOID); asn1_lpSeq.encode(encoder, encodedData); setValue(encodedData.toByteArray()); }catch(IOException ioe) { throw new LDAPException(ExceptionMessages.ENCODING_ERROR, LDAPException.ENCODING_ERROR,(String)null); } }
public LburpEndRequest(int lastSeq) throws LDAPException { super(LburpConstants.LBURPEndReplReqOID, null); try { ByteArrayOutputStream encodedData = new ByteArrayOutputStream(); LBEREncoder encoder = new LBEREncoder(); ASN1Sequence asn1_lpSeq = new ASN1Sequence(); ASN1Integer asn1_lastSeq = new ASN1Integer(lastSeq); asn1_lpSeq.add(asn1_lastSeq); asn1_lpSeq.encode(encoder, encodedData); setValue(encodedData.toByteArray()); }catch(IOException ioe) { throw new LDAPException(ExceptionMessages.ENCODING_ERROR, LDAPException.ENCODING_ERROR,(String)null); } }
throw new LDAPException(ExceptionMessages.ENCODING_ERROR, LDAPException.ENCODING_ERROR,(String) null);
throw new LDAPException(ExceptionMessages.ENCODING_ERROR, LDAPException.ENCODING_ERROR, (String)null);
/** * Writes an LDAPMessage to the LDAP server over a socket. * * @param info the Message containing the message to write. */ /* package */ void writeMessage(Message info) throws LDAPException { messages.addElement( info); // For bind requests, if not connected, attempt to reconnect if( info.isBindRequest() && (isConnected() == false) && (host != null)){ connect( host, port, info.getMessageID()); } if(isConnected()) { LDAPMessage msg = info.getRequest(); writeMessage( msg); return; } else throw new LDAPException(ExceptionMessages.CONNECTION_CLOSED, new Object[] { host, new Integer(port) }, LDAPException.CONNECT_ERROR, null,new IOException()); }
/** * Duplicate this message, replacing base dn, filter, and scope if supplied * * @param dn the base dn * <br><br> * @param filter the filter * <br><br> * @param reference true if a search reference * * @return the object representing the new message */ public final Object dupMessage( String dn, String filter, boolean reference) throws LDAPException { if( (op == null)) { if( Debug.LDAP_DEBUG ) { Debug.trace( Debug.referrals, "RfcLDAPMessage op == null, cannot dupMessage"); } throw new LDAPException("DUP_ERROR", LDAPException.LOCAL_ERROR, (String) null); } RfcLDAPMessage newMsg = new RfcLDAPMessage( toArray(), (RfcRequest)get(1), dn, filter, reference); return newMsg; }