Package org.apache.sling.discovery

Examples of org.apache.sling.discovery.TopologyView


        }, null);
        while ( views.isEmpty() ) {
            this.sleep(10);
        }
        reg.unregister();
        final TopologyView view = views.get(0);

        try {
            final ServiceReference[] refs = this.bc.getServiceReferences(TopologyEventListener.class.getName(),
                    "(objectClass=org.apache.sling.event.impl.jobs.config.JobManagerConfiguration)");
            assertNotNull(refs);
View Full Code Here


     */
    private void renderProperties(final PrintWriter pw, final String contextPath, final String nodeId) {
      if (logger.isDebugEnabled()) {
        logger.debug("renderProperties: nodeId=" + nodeId);
      }
        final TopologyView tv = this.currentView;
        @SuppressWarnings("unchecked")
        Set<InstanceDescription> instances = ( tv == null ? (Set<InstanceDescription>)Collections.EMPTY_SET :

                tv.findInstances(new InstanceFilter() {

                    public boolean accept(InstanceDescription instance) {
                        String slingId = instance.getSlingId();
                      if (logger.isDebugEnabled()) {
                          logger.debug("renderProperties/picks: slingId={}", slingId);
View Full Code Here

        return sb;
    }

    public void printConfiguration( final PrintWriter pw ) {
        final TopologyView topology = this.currentView;

        pw.println(TITLE);
        pw.println("---------------------------------------");
        pw.println();
        if ( topology == null ) {
            pw.println("No topology available yet!");
            return;
        }
        pw.print("Topology");
        if (!topology.isCurrent()) {
            pw.print(" changing!");
        }
        pw.println();
        pw.println();

        final Set<ClusterView> clusters = topology.getClusterViews();
        final ClusterView myCluster = topology.getLocalInstance().getClusterView();
        printCluster(pw, myCluster, myCluster);

        for (Iterator<ClusterView> it = clusters.iterator(); it.hasNext();) {
            ClusterView clusterView = it.next();
            if (clusterView.equals(myCluster)) {
View Full Code Here

    }
   
    @Test
    @Retry(timeoutMsec=30000, intervalMsec=500)
    public void testLargeTopologyWithHub() {
        final TopologyView tv = hub.getDiscoveryService().getTopology();
        logger.info(
                "testLargeTopologyWithHub: checking if all connectors are registered, TopologyView has {} Instances",
                tv.getInstances().size());
        TopologyTestHelper.assertTopologyConsistsOf(tv, slingIds.toArray(new String[slingIds.size()]));
        logger.info("testLargeTopologyWithHub: test passed");
    }
View Full Code Here

        public String getId() {
          return "0";
        }
            };
            this.topologyView = new TopologyView() {

          public InstanceDescription getLocalInstance() {
            return myDescription;
          }
View Full Code Here

TOP

Related Classes of org.apache.sling.discovery.TopologyView

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.