Package org.apache.directory.shared.ldap.codec.search

Examples of org.apache.directory.shared.ldap.codec.search.SearchResultDoneCodec


                sr.addResponse( convertSearchResultToDsml( searchResult, searchParameter ) );
            }
        }

        // Creating and adding a search result done at the end of the results
        SearchResultDoneCodec srd = new SearchResultDoneCodec();
        LdapResultCodec ldapResult = new LdapResultCodec();
        if ( !monitor.errorsReported() )
        {
            ldapResult.setResultCode( ResultCodeEnum.SUCCESS );
        }
        else
        {
            // Getting the exception
            Throwable t = monitor.getException();

            // Setting the result code
            ldapResult.setResultCode( ResultCodeEnum.getBestEstimate( t, MessageTypeEnum.SEARCH_REQUEST ) );

            // Setting the error message if there's one
            if ( t.getMessage() != null )
            {
                ldapResult.setErrorMessage( t.getMessage() );
            }
        }
        srd.setLdapResult( ldapResult );
        sr.addResponse( new SearchResultDoneDsml( srd ) );
    }
View Full Code Here


   
    public final void handle( LdapSession session, T response ) throws Exception
    {
        LOG.debug( "Handling single searchResultDone response: {}", response );
       
        SearchResultDoneCodec searchResult = (SearchResultDoneCodec)response;
       
        // Get the control
        Control control = searchResult.getCurrentControl();
        SyncDoneValueControl syncDoneCtrl = ( SyncDoneValueControl ) control;

        /** the sync cookie sent by the server */
        byte[] syncCookie;

View Full Code Here

               
                break;
               
            case SEARCH_RESULT_DONE:
                // Store the response into the responseQueue
                SearchResultDoneCodec searchResultDoneCodec = (SearchResultDoneCodec)response;
                searchResultDoneCodec.setMessageId( messageId );
                searchResultDoneCodec.addControl( response.getCurrentControl() );
                SearchResultDone searchResultDone = convert( searchResultDoneCodec );

                SearchFuture searchFuture = (SearchFuture)responseFuture;
               
                if ( searchFuture == null )
View Full Code Here

TOP

Related Classes of org.apache.directory.shared.ldap.codec.search.SearchResultDoneCodec

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.