Package org.apache.directory.shared.ldap.extras.controls.syncrepl_impl

Examples of org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncInfoValueDecorator


              0x01, 0x01, 0x10,             //         refreshDeletes BOOLEAN DEFAULT FALSE,
              0x31, 0x00,                   //         syncUUIDs SET OF syncUUID
            } );
        bb.flip();

        SyncInfoValueDecorator decorator = new SyncInfoValueDecorator( codec );
       
        decorator.setType( SynchronizationInfoEnum.SYNC_ID_SET );

        SyncInfoValue syncInfoValue = (SyncInfoValue)decorator.decode( bb.array() );

        assertEquals( SynchronizationInfoEnum.SYNC_ID_SET, syncInfoValue.getType() );
        assertEquals( "", Strings.utf8ToString(syncInfoValue.getCookie()) );
        assertTrue( syncInfoValue.isRefreshDeletes() );
        assertEquals( 0, syncInfoValue.getSyncUUIDs().size() );
View Full Code Here


                  0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
                  0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03
            } );
        bb.flip();

        SyncInfoValueDecorator decorator = new SyncInfoValueDecorator( codec );
       
        decorator.setType( SynchronizationInfoEnum.SYNC_ID_SET );

        SyncInfoValue syncInfoValue = (SyncInfoValue)decorator.decode( bb.array() );

        assertEquals( SynchronizationInfoEnum.SYNC_ID_SET, syncInfoValue.getType() );
        assertEquals( "", Strings.utf8ToString(syncInfoValue.getCookie()) );
        assertTrue( syncInfoValue.isRefreshDeletes() );
        assertEquals( 3, syncInfoValue.getSyncUUIDs().size() );
View Full Code Here

              0x01, 0x01, 0x10,             //         refreshDeletes BOOLEAN DEFAULT FALSE,
              0x31, 0x00,                   //         syncUUIDs SET OF syncUUID
            } );
        bb.flip();

        SyncInfoValueDecorator decorator = new SyncInfoValueDecorator( codec );
       
        decorator.setType( SynchronizationInfoEnum.SYNC_ID_SET );

        SyncInfoValue syncInfoValue = (SyncInfoValue)decorator.decode( bb.array() );

        assertEquals( SynchronizationInfoEnum.SYNC_ID_SET, syncInfoValue.getType() );
        assertEquals( "abc", Strings.utf8ToString(syncInfoValue.getCookie()) );
        assertTrue( syncInfoValue.isRefreshDeletes() );
        assertEquals( 0, syncInfoValue.getSyncUUIDs().size() );
View Full Code Here

                  0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
                  0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03
            } );
        bb.flip();

        SyncInfoValueDecorator decorator = new SyncInfoValueDecorator( codec );
       
        decorator.setType( SynchronizationInfoEnum.SYNC_ID_SET );

        SyncInfoValue syncInfoValue = (SyncInfoValue)decorator.decode( bb.array() );

        assertEquals( SynchronizationInfoEnum.SYNC_ID_SET, syncInfoValue.getType() );
        assertEquals( "abc", Strings.utf8ToString(syncInfoValue.getCookie()) );
        assertTrue( syncInfoValue.isRefreshDeletes() );
        assertEquals( 3, syncInfoValue.getSyncUUIDs().size() );
View Full Code Here

                  0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
                  0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01
            } );
        bb.flip();

        SyncInfoValueDecorator decorator = new SyncInfoValueDecorator( codec );
       
        decorator.setType( SynchronizationInfoEnum.SYNC_ID_SET );

        try
        {
            decorator.decode( bb.array() );
            fail( "Should not be there" );
        }
        catch ( DecoderException de )
        {
            assertTrue( true );
View Full Code Here

                  0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
                  0x01
            } );
        bb.flip();

        SyncInfoValueDecorator decorator = new SyncInfoValueDecorator( codec );
        decorator.setType( SynchronizationInfoEnum.SYNC_ID_SET );

        try
        {
            decorator.decode( bb.array() );
            fail( "Should not be there" );
        }
        catch ( DecoderException de )
        {
            assertTrue( true );
View Full Code Here

    {
        try
        {
            LOG.debug( "............... inside handleSyncInfo ..............." );

            SyncInfoValueDecorator decorator = new SyncInfoValueDecorator( ldapCodecService );
            byte[] syncinfo = syncInfoResp.getResponseValue();
            decorator.setValue( syncinfo );
            SyncInfoValue syncInfoValue = decorator.getDecorated();

            byte[] cookie = syncInfoValue.getCookie();

            if ( cookie != null )
            {
View Full Code Here

        {
            //System.out.println( "   --> In doContenUpdate, RNP " );
            IntermediateResponse intermResp = new IntermediateResponseImpl( req.getMessageId() );
            intermResp.setResponseName( SyncInfoValue.OID );

            SyncInfoValueDecorator syncInfo = new SyncInfoValueDecorator( ldapServer.getDirectoryService()
                .getLdapCodecService(),
                SynchronizationInfoEnum.NEW_COOKIE );
            syncInfo.setCookie( cookie );
            intermResp.setResponseValue( syncInfo.getValue() );

            session.getIoSession().write( intermResp );

            replicaLog.getPersistentListener().setPushInRealTime( refreshNPersist );
        }
View Full Code Here

                cookie = Strings.getBytesUtf8(replicaLog.getId() + REPLICA_ID_DELIM + contextCsn);

                IntermediateResponse intermResp = new IntermediateResponseImpl( request.getMessageId() );
                intermResp.setResponseName( SyncInfoValue.OID );

                SyncInfoValueDecorator syncInfo = new SyncInfoValueDecorator(
                    ldapServer.getDirectoryService().getLdapCodecService(), SynchronizationInfoEnum.NEW_COOKIE );
                syncInfo.setCookie( cookie );
                intermResp.setResponseValue( syncInfo.getValue() );

                session.getIoSession().write( intermResp );

                // switch the handler mode to realtime push
                handler.setPushInRealTime( refreshNPersist );
View Full Code Here

                control = new SyncDoneValueDecorator( getDirectoryService().getLdapCodecService() );
               
                break;

            case SYNC_INFO_VALUE_CONTROL:
                control = new SyncInfoValueDecorator( getDirectoryService().getLdapCodecService() );

                break;

            case SYNC_MODIFY_DN_CONTROL:
                control = new SyncModifyDnDecorator( getDirectoryService().getLdapCodecService() );
View Full Code Here

TOP

Related Classes of org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncInfoValueDecorator

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.