Examples of Registry


Examples of org.apache.synapse.registry.Registry

            }
        }

        assert synCfg != null;
        synCfg.setPathToConfigFile(new File(configFile).getAbsolutePath());
        Registry localConfigReg = synCfg.getRegistry();
        if (synCfg.getLocalRegistry().isEmpty() && synCfg.getProxyServices().isEmpty()
                && localConfigReg != null) {
            if (log.isDebugEnabled()) {
                log.debug("Only the registry is defined in the synapse configuration, trying " +
                        "to fetch a configuration from the registry");
            }
            // TODO: support a artifact repo for registry as well instead of just the synapse.xml
            OMNode remoteConfigNode = localConfigReg.lookup("synapse.xml");
            if (remoteConfigNode != null) {
                try {
                    synCfg = XMLConfigurationBuilder.getConfiguration(SynapseConfigUtils
                            .getStreamSource(remoteConfigNode).getInputStream(), properties);
                    // TODO: when you fetch the configuration and serialize the config in any case
View Full Code Here

Examples of org.apache.synapse.registry.Registry

        OMAttribute prov = elem.getAttribute(PROVIDER_Q);
        if (prov != null) {
            try {
                Class provider = Class.forName(prov.getAttributeValue());
                Registry registry = (Registry) provider.newInstance();
                registry.init(getProperties(elem, properties));
                return registry;

            } catch (ClassNotFoundException e) {
                handleException("Cannot locate registry provider class : " +
                    prov.getAttributeValue(), e);
View Full Code Here

Examples of org.apache.synapse.registry.Registry

    public static Registry defineRegistry(SynapseConfiguration config, OMElement elem,
                                          Properties properties) {
        if (config.getRegistry() != null) {
            handleException("Only one remote registry can be defined within a configuration");
        }
        Registry registry = RegistryFactory.createRegistry(elem, properties);
        config.setRegistry(registry);
        return registry;
    }
View Full Code Here

Examples of org.apache.tapestry.ioc.Registry

    /** The following tests work better as integration tests. */

    @Test
    public void integration_tests()
    {
        Registry registry = buildRegistry();

        UpcaseService us = registry.getService(UpcaseService.class);

        assertEquals(us.upcase("hello"), "HELLO");
        assertEquals(
                us.toString(),
                "<Proxy for Upcase(org.apache.tapestry.ioc.internal.UpcaseService)>");

        ToStringService ts = registry.getService(ToStringService.class);

        assertEquals(ts.toString(), "<ToStringService: ToString>");
    }
View Full Code Here

Examples of org.apache.tapestry5.ioc.Registry

    }

    @Test
    public void integration()
    {
        Registry registry = buildRegistry();

        PropertyAccess pa = registry.getService("PropertyAccess", PropertyAccess.class);

        Bean b = new Bean();

        int value = random.nextInt();

        pa.set(b, "value", value);

        assertEquals(b.getValue(), value);

        registry.shutdown();
    }
View Full Code Here

Examples of org.apache.tomcat.util.modeler.Registry

                ContextAccessController.unsetSecurityToken(container, container);

                // unregister mbeans.
                if (!objectNames.isEmpty()) {
                    Collection<ObjectName> names = objectNames.values();
                    Registry registry = Registry.getRegistry(null, null);
                    for (ObjectName objectName : names) {
                        registry.unregisterComponent(objectName);
                    }
                }
            } finally {
                objectNames.clear();
View Full Code Here

Examples of org.apache.wink.common.internal.model.admin.Registry

    private void buildRegistryDocument(HttpServletRequest request,
                                       HttpServletResponse response,
                                       ResourceRegistry registry) throws ServletException,
        IOException {

        Registry xmlRgistry = resourcesObjectFactory.createRegistry();
        org.apache.wink.common.internal.model.admin.Resources resources =
            resourcesObjectFactory.createResources();
        List<ResourceRecord> records = registry.getRecords();

        for (ResourceRecord record : records) {

            // Add current resource
            Resource xmLResource = buildResource(record);
            xmLResource.setPriority(new BigDecimal(record.getPriority()));
            xmLResource.setClassName(record.getMetadata().getResourceClass().getCanonicalName());

            // Add sub-resource locators & methods
            addSubRrcMethodsAndLocators(xmLResource, record);

            resources.getResource().add(xmLResource);

        }

        // Write Document
        xmlRgistry.setResources(resources);
        writeDocument(response, xmlRgistry);
        return;
    }
View Full Code Here

Examples of org.codehaus.enunciate.contract.jaxb.Registry

          }
        }
      }
      else if (isRegistry(declaration)) {
        debug("%s to be considered as an XML registry.", declaration.getQualifiedName());
        Registry registry = new Registry((ClassDeclaration) declaration);
        model.add(registry);
      }
      else if (isJAXRSApplication(declaration)) {
        debug("%s is identified as a JAX-RS Application class.", declaration.getQualifiedName());
        ApplicationPath applicationPath = declaration.getAnnotation(ApplicationPath.class);
View Full Code Here

Examples of org.codehaus.plexus.registry.Registry

  
    public String getGuest()
    {
        if( guest == null || "".equals( guest ) )
        {
            Registry subset = registry.getSubset( KEY );
            guest = subset.getString( "redback.default.guest", ArchivaRoleConstants.PRINCIPAL_GUEST );
        }
       
        return guest;
    }
View Full Code Here

Examples of org.eclipse.emf.ecore.EPackage.Registry

    new XdocStandaloneSetup().createInjectorAndDoEMFRegistration();
  }

  @Override
  public void register(Injector injector) {
    Registry registry = injector.getInstance(EPackage.Registry.class);
    registry.put(XdocPackage.eINSTANCE.getNsURI(), XdocPackage.eINSTANCE);
    super.register(injector);
  }
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.