Package nexj.core.meta.integration.service

Examples of nexj.core.meta.integration.service.Binding


      {
         m_writer.startElement("ServiceBindings");

         for (int i = 0; i < channel.getBindingCount(); ++i)
         {
            Binding binding = channel.getBinding(i);

            m_writer.openElement("ServiceBinding");
            m_writer.writeAttribute("service", binding.getService().getName());

            if (binding.getOutput() != null)
            {
               m_writer.writeAttribute("output", binding.getOutput().getName());
            }

            int nArgCount = binding.getService().getArgumentCount();

            if (nArgCount > 0)
            {
               m_writer.closeElement();
               m_writer.startElement("Arguments");

               for (int nArgIndex = 0; nArgIndex < nArgCount; ++nArgIndex)
               {
                  Variable arg = binding.getService().getArgument(nArgIndex);

                  Object value = binding.getArgumentValue(arg.getName());

                  if (value != Undefined.VALUE)
                  {
                     m_writer.openElement("Argument");
                     m_writer.writeAttribute("name", arg.getName());
View Full Code Here


                           return XMLUtil.getReqStringAttr(element, "service");
                        }

                        public void handleElement(Element bindingElement, String sService)
                        {
                           final Binding binding = new Binding(m_metadata.getService(sService), channel);
                           String sOutput = XMLUtil.getStringAttr(bindingElement, "output");

                           if (sOutput != null)
                           {
                              binding.setOutput(m_metadata.getChannel(sOutput));
                           }

                           XMLUtil.withFirstChildElement(bindingElement, "Arguments", false, new ElementHandler()
                           {
                              public void handleElement(Element argumentsElement)
                              {
                                 XMLUtil.forEachChildElement(argumentsElement, "Argument", m_helper.new ElementHandler("argument")
                                 {
                                    public void handleElement(Element argumentElement, String sArgument)
                                    {
                                       String sChannel = XMLUtil.getStringAttr(argumentElement, "channel");

                                       if (sChannel != null)
                                       {
                                          binding.setArgumentChannel(sArgument, m_metadata.getChannel(sChannel));
                                       }

                                       String sValue = XMLUtil.getStringAttr(argumentElement, "value");

                                       if (sValue != null)
                                       {
                                          binding.setArgumentValue(sArgument,
                                             m_helper.parse(sValue, false, null, null, m_metadata.getGlobalEnvironment()));
                                       }
                                    }
                                 });
                              }
                           });

                           binding.compile(m_machine);
                           channel.addBinding(binding);
                        }
                     });
                  }
               });
View Full Code Here

      Service service = binding.getService();
      Interface iface = service.getInterface();
     
      for (int i = m_bindingList.size() - 1; i >= 0; --i)
      {
         Binding prevbnd = (Binding)m_bindingList.get(i);
         Service prevsvc = prevbnd.getService();
        
         if (prevsvc == service && m_nCombinationMode != COMBINE_ALL)
         {
            throw new MetadataException("err.meta.integration.bindingDup",
               new Object[]{service.getFullName(), getName()});
View Full Code Here

TOP

Related Classes of nexj.core.meta.integration.service.Binding

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.