Examples of SyncDoneValue


Examples of org.apache.directory.shared.ldap.extras.controls.SyncDoneValue

    public ResultCodeEnum handleSearchDone( SearchResultDone searchDone )
    {
        LOG.debug( "///////////////// handleSearchDone //////////////////" );

        SyncDoneValue ctrl = ( SyncDoneValue ) searchDone.getControls().get( SyncDoneValue.OID );

        if ( ( ctrl != null ) && ( ctrl.getCookie() != null ) )
        {
            syncCookie = ctrl.getCookie();
            LOG.debug( "assigning cookie from sync done value control: " + Strings.utf8ToString( syncCookie ) );
            storeCookie();
        }

        LOG.debug( "//////////////// END handleSearchDone//////////////////////" );
View Full Code Here

Examples of org.apache.directory.shared.ldap.extras.controls.SyncDoneValue

    public ResultCodeEnum handleSearchDone( SearchResultDone searchDone )
    {
        LOG.debug( "///////////////// handleSearchDone //////////////////" );

        SyncDoneValue ctrl = ( SyncDoneValue ) searchDone.getControls().get( SyncDoneValue.OID );

        if ( ( ctrl != null ) && ( ctrl.getCookie() != null ) )
        {
            syncCookie = ctrl.getCookie();
            LOG.debug( "assigning cookie from sync done value control: " + Strings.utf8ToString( syncCookie ) );
            storeCookie();
        }

        LOG.debug( "//////////////// END handleSearchDone//////////////////////" );
View Full Code Here

Examples of org.apache.directory.shared.ldap.extras.controls.SyncDoneValue

        bb.flip();

        SyncDoneValueDecorator decorator =  new SyncDoneValueDecorator( codec );

        SyncDoneValue control = (SyncDoneValue)decorator.decode( bb.array() );
       
        assertEquals( "xkcd", Strings.utf8ToString(control.getCookie()) );
        assertTrue( control.isRefreshDeletes() );
       
        // test encoding
        try
        {
            ByteBuffer buffer = ((SyncDoneValueDecorator)control).encode( ByteBuffer.allocate( ((SyncDoneValueDecorator)control).computeLength() ) );
View Full Code Here

Examples of org.apache.directory.shared.ldap.extras.controls.SyncDoneValue

        bb.flip();

        SyncDoneValueDecorator decorator =  new SyncDoneValueDecorator( codec );

        SyncDoneValue control = (SyncDoneValue)decorator.decode( bb.array() );

        assertNull( control.getCookie() );
        assertTrue( control.isRefreshDeletes() );

        // test encoding
        try
        {
            ByteBuffer buffer = ((SyncDoneValueDecorator)control).encode( ByteBuffer.allocate( ((SyncDoneValueDecorator)control).computeLength() ) );
View Full Code Here

Examples of org.apache.directory.shared.ldap.extras.controls.SyncDoneValue

        bb.flip();

        SyncDoneValueDecorator decorator =  new SyncDoneValueDecorator( codec );

        SyncDoneValue control = (SyncDoneValue)decorator.decode( bb.array() );

        assertNull( control.getCookie() );
        assertFalse( control.isRefreshDeletes() );
    }
View Full Code Here

Examples of org.apache.directory.shared.ldap.extras.controls.SyncDoneValue

        bb.flip();

        SyncDoneValueDecorator decorator =  new SyncDoneValueDecorator( codec );

        SyncDoneValue control = (SyncDoneValue)decorator.decode( bb.array() );

        assertEquals( "", Strings.utf8ToString(control.getCookie()) );
        assertFalse( control.isRefreshDeletes() );

        // test encoding
        try
        {
            ByteBuffer buffer = ((SyncDoneValueDecorator)control).encode( ByteBuffer.allocate( ((SyncDoneValueDecorator)control).computeLength() ) );
View Full Code Here

Examples of org.apache.directory.shared.ldap.extras.controls.SyncDoneValue

    public ResultCodeEnum handleSearchDone( SearchResultDone searchDone )
    {
        LOG.debug( "///////////////// handleSearchDone //////////////////" );

        SyncDoneValue ctrl = (SyncDoneValue)searchDone.getControls().get( SyncDoneValue.OID );

        if ( ( ctrl != null ) && ( ctrl.getCookie() != null ) )
        {
            syncCookie = ctrl.getCookie();
            LOG.debug( "assigning cookie from sync done value control: " + Strings.utf8ToString(syncCookie) );
            storeCookie();
        }

        LOG.debug( "//////////////// END handleSearchDone//////////////////////" );
View Full Code Here

Examples of org.apache.directory.shared.ldap.extras.controls.SyncDoneValue

        }
        else
        {
            SearchResultDone searchDoneResp = ( SearchResultDone ) req.getResultResponse();
            searchDoneResp.getLdapResult().setResultCode( ResultCodeEnum.SUCCESS );
            SyncDoneValue syncDone = new SyncDoneValueDecorator(
                ldapServer.getDirectoryService().getLdapCodecService() );
            syncDone.setCookie( cookie );
            searchDoneResp.addControl( syncDone );

            session.getIoSession().write( searchDoneResp );
        }
View Full Code Here

Examples of org.apache.directory.shared.ldap.extras.controls.SyncDoneValue

                handler.setPushInRealTime( refreshNPersist );
            }
            else
            {
                // no need to send from the log, that will be done in the next refreshOnly session
                SyncDoneValue syncDone = new SyncDoneValueDecorator(
                    ldapServer.getDirectoryService().getLdapCodecService() );
                syncDone.setCookie( cookie );
                searchDoneResp.addControl( syncDone );
                session.getIoSession().write( searchDoneResp );
            }
        }
        else
View Full Code Here

Examples of org.apache.directory.shared.ldap.extras.controls.SyncDoneValue

                0x30, 0x00
        } );

        bb.flip();

        SyncDoneValue decorator = new SyncDoneValueDecorator( codec );

        SyncDoneValue control = ( SyncDoneValue ) ( ( SyncDoneValueDecorator ) decorator ).decode( bb.array() );

        assertNull( control.getCookie() );
        assertFalse( control.isRefreshDeletes() );
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.