Package org.apache.sling.replication.component

Examples of org.apache.sling.replication.component.ReplicationComponentFactory


        config.put(CoordinatingReplicationAgentFactory.PACKAGE_EXPORTER, new String[]{"packageBuilder/type=vlt",
                "endpoints[0]=http://localhost:101/libs/sling/replication/services/importers/default",
                "endpoints[1]=http://localhost:102/libs/sling/replication/services/importers/default",
                "endpoints[2]=http://localhost:103/libs/sling/replication/services/importers/default",
                "endpoints.strategy=All"});
        ReplicationComponentFactory replicationComponentFactory = mock(ReplicationComponentFactory.class);
        ReplicationAgent replicationAgent = mock(ReplicationAgent.class);
        CoordinatingReplicationAgentFactory coordinatingReplicationAgentFactory = new CoordinatingReplicationAgentFactory();
        when(replicationComponentFactory.createComponent(ReplicationAgent.class, config, coordinatingReplicationAgentFactory)).
                thenReturn(replicationAgent);

        Field componentFactory = coordinatingReplicationAgentFactory.getClass().getDeclaredField("componentFactory");
        componentFactory.setAccessible(true);
        componentFactory.set(coordinatingReplicationAgentFactory, replicationComponentFactory);
View Full Code Here

TOP

Related Classes of org.apache.sling.replication.component.ReplicationComponentFactory

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.