Examples of Binding


Examples of modbuspal.binding.Binding

        Node parentRegister = XMLTools.findParent(node,"register");
        String parentAddress = XMLTools.getAttribute(ModbusPalXML.XML_ADDRESS_ATTRIBUTE, parentRegister);
        int registerAddress = Integer.parseInt( parentAddress );

        // Instanciate the binding:
        Binding binding = bindingFactory.newInstance(className);
        binding.setup(automation, wordOrder);


        if( slave==null)
        {
            // retrieve the slave that is the parent of this register
View Full Code Here

Examples of net.sf.launch4j.binding.Binding

                  Main.getName(),
                  JOptionPane.WARNING_MESSAGE);
  }

  public void warn(InvariantViolationException e) {
    Binding b = e.getBinding();
    if (b != null) {
      b.markInvalid();
    }
    warn(e.getMessage());
    if (b != null) {
      e.getBinding().markValid();
    }
View Full Code Here

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

Examples of org.apache.agila.model.Binding

        TaskService tskServ = new TaskServiceImpl();
        NotificationService notifyService = new NotificationServiceImpl();

        node = new HelloWorldActivity();

        node.addBinding(new Binding("cheese", "edam", Binding.STATIC, true, true));

        node.addBinding(new Binding("drink", "drink", Binding.EL, true, true));

        context = new NodeContextImpl(node, new InstanceImpl(), ts, tskServ, notifyService );
    }
View Full Code Here

Examples of org.apache.axis2.jaxws.spi.Binding

        request.getAxisMessageContext().setProperty(BINDING_PROVIDER, this);
        request.setEndpointDescription(getEndpointDescription());
        request.setOperationDescription(operationDesc);

        // Enable MTOM on the Message if the property was set on the SOAPBinding.
        Binding bnd = (Binding) getBinding();
        if (bnd != null && bnd instanceof SOAPBinding) {
            if (((SOAPBinding)bnd).isMTOMEnabled()) {
                Message requestMsg = request.getMessage();
                requestMsg.setMTOMEnabled(true);
                int threshold = ((org.apache.axis2.jaxws.binding.SOAPBinding)bnd).getMTOMThreshold();
                request.setProperty(org.apache.axis2.Constants.Configuration.MTOM_THRESHOLD,
                        new Integer(threshold));
            }
            if (((org.apache.axis2.jaxws.binding.SOAPBinding)bnd).isRespectBindingEnabled()) {
                //lets invoke Utility to configure RespectBinding.
                EndpointDescription endpointDescription = getEndpointDescription();
                endpointDescription.setRespectBinding(true);
                WSDLExtensionUtils.processExtensions(endpointDescription);
                //We have build up set of extensions from wsdl
                //let go ahead and validate these extensions now.
                EndpointDescriptionValidator endpointValidator = new EndpointDescriptionValidator(endpointDescription);
                
                boolean isEndpointValid = endpointValidator.validate(true);
                //throw Exception if extensions are not understood by Engine.
                if (!isEndpointValid) {
                    String msg = Messages.getMessage("endpointDescriptionValidationErrors",
                                                     endpointValidator.toString());
                    throw ExceptionFactory.makeWebServiceException(msg);
                }
            }
        }
       
        /*
         * TODO: review: make sure the handlers are set on the InvocationContext
         * This implementation of the JAXWS runtime does not use Endpoint, which
         * would normally be the place to initialize and store the handler list.
         * In lieu of that, we will have to intialize and store them on the
         * InvocationContext.  also see the InvocationContextFactory.  On the client
         * side, the binding is not yet set when we call into that factory, so the
         * handler list doesn't get set on the InvocationContext object there.  Thus
         * we gotta do it here.
         */
       
        // be sure to use whatever handlerresolver is registered on the Service
        requestIC.setHandlers(bnd.getHandlerChain());

        requestIC.setRequestMessageContext(request);
        requestIC.setServiceClient(serviceDelegate.getServiceClient(endpointDesc.getPortQName()));
       
        /*
         * if SESSION_MAINTAIN_PROPERTY is true, and the client app has explicitly set a HEADER_COOKIE on the request context, assume the client
         * app is expecting the HEADER_COOKIE to be the session id.  If we were establishing a new session, no cookie would be sent, and the
         * server would reply with a "Set-Cookie" header, which is copied as a "Cookie"-keyed property to the service context during response.
         * In this case, if we succeed in using an existing server session, no "Set-Cookie" header will be returned, and therefore no
         * "Cookie"-keyed property would be set on the service context.  So, let's copy our request context HEADER_COOKIE key to the service
         * context now to prevent the "no cookie" exception in BindingProvider.setupSessionContext.  It is possible the server does not support
         * sessions, in which case no error occurs, but the client app would assume it is participating in a session.
         */
        if ((requestContext.containsKey(BindingProvider.SESSION_MAINTAIN_PROPERTY)) && ((Boolean)requestContext.get(BindingProvider.SESSION_MAINTAIN_PROPERTY))) {
            if ((requestContext.containsKey(HTTPConstants.HEADER_COOKIE)) && (requestContext.get(HTTPConstants.HEADER_COOKIE) != null)) {
                if (requestIC.getServiceClient().getServiceContext().getProperty(HTTPConstants.HEADER_COOKIE) == null) {
                    requestIC.getServiceClient().getServiceContext().setProperty(HTTPConstants.HEADER_COOKIE, requestContext.get(HTTPConstants.HEADER_COOKIE));
                    if (log.isDebugEnabled()) {
                        log.debug("Client-app defined Cookie property (assume to be session cookie) on request context copied to service context." +
                                "  Caution:  server may or may not support sessions, but client app will not be informed when not supported.");
                    }
                }
            }
        }
       
        // Migrate the properties from the client request context bag to
        // the request MessageContext.
        ApplicationContextMigratorUtil.performMigrationToMessageContext(
                Constants.APPLICATION_CONTEXT_MIGRATOR_LIST_ID,
                getRequestContext(), request);

        // Note that configuring the MessageContext for addressing based on the metadata and for any
        // WebService Features needs to be done after the application context migration since it will move properties
        // from the JAXWS RequestContext onto the Axis2 Message context, overwritting any that are already set.
        configureAddressing(request, this);
        // Perform the WebServiceFeature configuration requested by the user.
        bnd.configure(request, this);

        // We'll need an InvocationController instance to send the request.
        InvocationControllerFactory icf = (InvocationControllerFactory) FactoryRegistry.getFactory(InvocationControllerFactory.class);
        controller = icf.getInvocationController();
       
View Full Code Here

Examples of org.apache.camel.spi.Binding

        this.uriPrefix = uriPrefix;
    }

    @Override
    protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
        Binding bindingValue = getBinding();
        ObjectHelper.notNull(bindingValue, "binding");

        CamelContext camelContext = getCamelContext();
        String delegateURI = createDelegateURI(remaining, parameters);
        Endpoint delegate = getMandatoryEndpoint(camelContext, delegateURI);
View Full Code Here

Examples of org.apache.cocoon.forms.binding.Binding

        sourceURI = LocationAttributes.getURI(libraryElement);
        this.assistant.getContext().setLocalLibrary(this);
        Element[] bindingElements = DomHelper.getChildElements(libraryElement, BindingManager.NAMESPACE);
        for (int i = 0; i < bindingElements.length; i++) {
            Element bindingElement = bindingElements[i];
            Binding binding = this.assistant.getBindingForConfigurationElement(bindingElement);
            addBinding(binding);
        }
    }
View Full Code Here

Examples of org.apache.cxf.binding.Binding

            }

            if (mo instanceof ChainInitiationObserver) {
                ChainInitiationObserver cio = (ChainInitiationObserver) mo;
               
                Binding b = e.getBinding();
                Binding b2 = cio.getEndpoint().getBinding();
                if (b == b2) {
                    //re-registering the same endpoint?
                    return;
                }
                Object o = cio.getEndpoint().get("allow-multiplex-endpoint");
View Full Code Here

Examples of org.apache.cxf.ws.security.policy.model.Binding

        mapSecurityProps(message, ctx);
        return s;
    }
   
    private static AlgorithmSuite getAlgorithmSuite(AssertionInfoMap aim) {
        Binding transport = null;
        Collection<AssertionInfo> ais = aim.get(SP12Constants.TRANSPORT_BINDING);
        if (ais != null) {
            for (AssertionInfo ai : ais) {
                transport = (Binding)ai.getAssertion();
            }                   
        } else {
            ais = aim.get(SP12Constants.ASYMMETRIC_BINDING);
            if (ais != null) {
                for (AssertionInfo ai : ais) {
                    transport = (Binding)ai.getAssertion();
                }                   
            } else {
                ais = aim.get(SP12Constants.SYMMETRIC_BINDING);
                if (ais != null) {
                    for (AssertionInfo ai : ais) {
                        transport = (Binding)ai.getAssertion();
                    }                   
                }
            }
        }
        if (transport != null) {
            return transport.getAlgorithmSuite();
        }
        return null;
    }
View Full Code Here

Examples of org.apache.felix.ipojo.manipulator.metadata.annotation.registry.Binding

            }
        };
        module.configure();

        Iterator<Binding> i = module.iterator();
        Binding one = i.next();
        assertNotNull(one);
        assertEquals(getType(Provides.class), one.getAnnotationType());
        assertEquals(factory, one.getFactory());

        // Only 1 Binding
        assertFalse(i.hasNext());
    }
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.