Package org.mule.registry

Examples of org.mule.registry.RegistryComponent


    List result = new ArrayList();

    for (int i = 0; i < endpoints.length; i++) {
      AbstractServiceEndpoint se = (AbstractServiceEndpoint) endpoints[i];
      String compName = se.getComponent();
      RegistryComponent compInfo = container.getRegistry().getComponent(compName);
      if (me.getRole() == MessageExchange.Role.CONSUMER) {
        if (((Component)compInfo.getComponent()).isExchangeWithConsumerOkay(se, me)) {
          result.add(se);
        }
      } else {
        if (((Component)compInfo.getComponent()).isExchangeWithProviderOkay(se, me)) {
          result.add(se);
        }
      }
    }
    return (ServiceEndpoint[]) result.toArray(new ServiceEndpoint[result.size()]);
View Full Code Here


    ServiceEndpoint se = this.endpoints.getEndpoint(endpoint.getServiceName(), endpoint.getEndpointName());
    // If endpoint is registered
    if (se instanceof AbstractServiceEndpoint) {
      // Query for the component
      String name = ((AbstractServiceEndpoint) se).getComponent();
      RegistryComponent component = this.registry.getComponent(name);
      if (component != null) {
        // Delegate to the component
        return ((Component)component.getComponent()).getServiceDescription(endpoint);
      }
    }
    return null;
  }
View Full Code Here

        // TODO: use axis builders when available
        // TODO: extract this code elsewhere
        // TODO: service descriptions should be cached
        // TODO: operations can be put on the endpoint
        String name = ((AbstractServiceEndpoint) endpoints[i]).getComponent();
        RegistryComponent info = this.channel.getContainer().getRegistry().getComponent(name);
        Document doc = ((Component)info.getComponent()).getServiceDescription(endpoints[i]);
        String uri = doc.getDocumentElement().getNamespaceURI();
        WSDLDescription desc = null;
        if (WSDLConstants.WSDL2_0_NAMESPACE.equals(uri)) {
          throw new UnsupportedOperationException(uri);
        } else if (WSDLConstants.WSDL1_1_NAMESPACE.equals(uri)) {
View Full Code Here

    for (Iterator it = endpoints.iterator(); it.hasNext();) {
      ServiceEndpoint se = (ServiceEndpoint) it.next();
      QName[] itfs = se.getInterfaces();
      if (itfs == null && se instanceof InternalEndpointImpl) {
        InternalEndpointImpl ie = (InternalEndpointImpl) se;
        RegistryComponent component = JbiContainer.Factory.getInstance().getRegistry().getComponent(ie.getComponent());
        Document doc = ((Component)component.getComponent()).getServiceDescription(ie);
        ie.parseWsdl(doc);
        itfs = se.getInterfaces();
      }
      if (itfs != null) {
        for (int i = 0; i < itfs.length; i++) {
View Full Code Here

    public ObjectName[] getEngineComponents() {
        return getComponents(ComponentType.JBI_ENGINE_COMPONENT);
  }

  public ObjectName getComponentByName(String name) {
    RegistryComponent comp = context.getRegistry().getComponent(name);
    if (comp != null) {
      return comp.getObjectName();
    }
    return null;
  }
View Full Code Here

    // TODO Auto-generated method stub
    return new ObjectName[0];
  }

  public boolean isBinding(String componentName) {
    RegistryComponent comp = context.getRegistry().getComponent(componentName);
    return comp.getType().equals(ComponentType.JBI_BINDING_COMPONENT);
  }
View Full Code Here

    RegistryComponent comp = context.getRegistry().getComponent(componentName);
    return comp.getType().equals(ComponentType.JBI_BINDING_COMPONENT);
  }

    public boolean isEngine(String componentName) {
    RegistryComponent comp = context.getRegistry().getComponent(componentName);
    return comp.getType().equals(ComponentType.JBI_ENGINE_COMPONENT);
  }
View Full Code Here

      IOUtils.createDirs(installDir);
      IOUtils.createDirs(workspaceDir);
      // Unzip all
      IOUtils.unzip(f, installDir);
      // Create component
      RegistryComponent component;
      if (engine) {
        component = context.getRegistry().addComponent(name, ComponentType.JBI_ENGINE_COMPONENT);
      } else {
        component = context.getRegistry().addComponent(name, ComponentType.JBI_BINDING_COMPONENT);
      }
      component.setInstallRoot(installDir.getAbsolutePath());
      component.setWorkspaceRoot(workspaceDir.getAbsolutePath());
      component.setDescriptor(new JbiDescriptor(jbi));
      // Create and register installer
      Installer installer = new Installer(context, component);
      installer.init();
      ObjectName objName = createComponentInstallerName(name);
      StandardMBean mbean = new StandardMBean(installer, InstallerMBean.class);
View Full Code Here

  public synchronized ObjectName loadInstaller(String aComponentName) {
    try {
      if (this.installers.get(aComponentName) != null) {
        return createComponentInstallerName(aComponentName);
      } else {
        RegistryComponent component = context.getRegistry().getComponent(aComponentName);
        if (component == null) {
          throw new JBIException("Component not installed: " + aComponentName);
        }
        Installer installer = new Installer(context, component);
        installer.init();
View Full Code Here

    Installer installer = (Installer) this.installers.get(aComponentName);
    if (installer == null) {
      return false;
    }
    try {
      RegistryComponent component = context.getRegistry().getComponent(aComponentName);
      if (component != null && component.getCurrentState().equals(RegistryComponent.UNKNOWN)) {
        component.uninstall();
      }
      ObjectName objName = createComponentInstallerName(aComponentName);
      if (context.getMBeanServer().isRegistered(objName)) {
        context.getMBeanServer().unregisterMBean(objName);
      }
View Full Code Here

TOP

Related Classes of org.mule.registry.RegistryComponent

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.