Package org.apache.tuscany.sca.core.invocation.impl

Examples of org.apache.tuscany.sca.core.invocation.impl.InvocationChainImpl$Node


        public void addClientSubscriptionInfo() throws Exception {
                Assume.assumeTrue(TckPublisher.isJUDDI());

                ClientSubscriptionInfo clientSubscriptionInfo = new ClientSubscriptionInfo();

                Node node = new Node();
                node.setSecurityUrl("http://localhost:8080/services");
                node.setCustodyTransferUrl("http://localhost:8080/services");
                node.setDescription("TEST");
                node.setInquiryUrl("http://localhost:8080/services");
                node.setPublishUrl("http://localhost:8080/services");
                node.setSubscriptionListenerUrl("http://localhost:8080/services");
                node.setSubscriptionUrl("http://localhost:8080/services");
                node.setProxyTransport(org.apache.juddi.v3.client.transport.JAXWSTransport.class.getCanonicalName());
               
                node.setName("addClientSubscriptionInfoNode");
                node.setClientName("addClientSubscriptionInfoNode");

                Clerk clerk = new Clerk();
                clerk.setName("addClientSubscriptionInfoClerk");
                clerk.setPublisher("root");
                clerk.setNode(node);
View Full Code Here


  public void setProperties(Properties properties) {
    this.properties = properties;
  }
 
  public Node getApiNode() {
    Node apiNode = new Node();
    apiNode.setCustodyTransferUrl(custodyTransferUrl);
    apiNode.setDescription(description);
    apiNode.setFactoryInitial(factoryInitial);
    apiNode.setFactoryNamingProvider(factoryNamingProvider);
    apiNode.setFactoryURLPkgs(factoryURLPkgs);
    apiNode.setInquiryUrl(inquiryUrl);
                //apiNode.setInquiryRESTUrl(name);
    apiNode.setJuddiApiUrl(juddiApiUrl);
    apiNode.setClientName(clientName);
    apiNode.setName(name);
    apiNode.setProxyTransport(proxyTransport);
    apiNode.setPublishUrl(publishUrl);
    apiNode.setSecurityUrl(securityUrl);
    apiNode.setSubscriptionUrl(subscriptionUrl);
    return apiNode;
  }
View Full Code Here

           

         
            SaveNode node = new SaveNode();
            node.setAuthInfo(token);
            Node n = new Node();
            n.setClientName("juddicloud");
            n.setName("juddicloud");
            n.setCustodyTransferUrl("http://uddi-jbossoverlord.rhcloud.com/services/custody-transfer");
            n.setDescription("juddicloud");
            n.setProxyTransport("org.apache.juddi.v3.client.transport.JAXWSTransport");
            n.setInquiryUrl("http://uddi-jbossoverlord.rhcloud.com/services/inquiry");
            n.setJuddiApiUrl("http://uddi-jbossoverlord.rhcloud.com/services/juddi-api");
            n.setPublishUrl("http://uddi-jbossoverlord.rhcloud.com/services/publish");
            n.setSecurityUrl( "http://uddi-jbossoverlord.rhcloud.com/services/security");
            n.setSubscriptionListenerUrl("http://uddi-jbossoverlord.rhcloud.com/services/subscription-listener");
            n.setSubscriptionUrl("http://uddi-jbossoverlord.rhcloud.com/services/subscription");
            node.getNode().add(n);
           
            PrintJUDDI<SaveNode> p = new PrintJUDDI<SaveNode>();
            System.out.println("Before sending");
            System.out.println(p.print(node));
View Full Code Here

        private String save_Clerk(HttpServletRequest parameters) {
                SaveClerk sc = new SaveClerk();
                sc.setAuthInfo(GetToken());
                Clerk c = new Clerk();
                c.setName(parameters.getParameter("CLERKsetName"));
                Node node = new Node();
                node.setClientName(parameters.getParameter("CLERKNODEsetClientName"));
                node.setCustodyTransferUrl(parameters.getParameter("CLERKNODEsetCustodyTransferUrl"));
                node.setDescription(parameters.getParameter("CLERKNODEsetDescription"));
                node.setFactoryInitial(parameters.getParameter("CLERKNODEsetFactoryInitial"));
                node.setFactoryNamingProvider(parameters.getParameter("CLERKNODEsetFactoryNamingProvider"));
                node.setFactoryURLPkgs(parameters.getParameter("CLERKNODEsetFactoryURLPkgs"));
                node.setInquiryUrl(parameters.getParameter("CLERKNODEsetInquiryUrl"));
                node.setJuddiApiUrl(parameters.getParameter("CLERKNODEsetJuddiApiUrl"));
                node.setName(parameters.getParameter("CLERKNODEsetName"));
                node.setProxyTransport(parameters.getParameter("CLERKNODEsetProxyTransport"));
                node.setPublishUrl(parameters.getParameter("CLERKNODEsetPublishUrl"));
                node.setReplicationUrl(parameters.getParameter("CLERKNODEsetReplicationUrl"));
                node.setSecurityUrl(parameters.getParameter("CLERKNODEsetSecurityUrl"));
                node.setSubscriptionListenerUrl(parameters.getParameter("CLERKNODEsetSubscriptionListenerUrl"));
                node.setSubscriptionUrl(parameters.getParameter("CLERKNODEsetSubscriptionUrl"));
                c.setNode(node);
                c.setPassword(parameters.getParameter("CLERKsetPassword"));
                c.setPublisher(parameters.getParameter("CLERKsetPublisher"));

                sc.getClerk().add(c);
View Full Code Here

        }

        private String save_Node(HttpServletRequest parameters) {
                SaveNode sn = new SaveNode();
                sn.setAuthInfo(GetToken());
                Node node = new Node();
                node.setClientName(parameters.getParameter("NODEsetClientName"));
                node.setCustodyTransferUrl(parameters.getParameter("NODEsetCustodyTransferUrl"));
                node.setDescription(parameters.getParameter("NODEsetDescription"));
                node.setFactoryInitial(parameters.getParameter("NODEsetFactoryInitial"));
                node.setFactoryNamingProvider(parameters.getParameter("NODEsetFactoryNamingProvider"));
                node.setFactoryURLPkgs(parameters.getParameter("NODEsetFactoryURLPkgs"));
                node.setInquiryUrl(parameters.getParameter("NODEsetInquiryUrl"));
                node.setJuddiApiUrl(parameters.getParameter("NODEsetJuddiApiUrl"));
                node.setName(parameters.getParameter("NODEsetName"));
                node.setProxyTransport(parameters.getParameter("NODEsetProxyTransport"));
                node.setPublishUrl(parameters.getParameter("NODEsetPublishUrl"));
                node.setReplicationUrl(parameters.getParameter("NODEsetReplicationUrl"));
                node.setSecurityUrl(parameters.getParameter("NODEsetSecurityUrl"));
                node.setSubscriptionListenerUrl(parameters.getParameter("NODEsetSubscriptionListenerUrl"));
                node.setSubscriptionUrl(parameters.getParameter("NODEsetSubscriptionUrl"));
                sn.getNode().add(node);

                try {
                        juddi.saveNode(sn);
                } catch (Exception ex) {
View Full Code Here

                x.getClientSubscriptionInfo().get(0).setLastModified(null);
                x.getClientSubscriptionInfo().get(0).setLastNotified(null);
                x.getClientSubscriptionInfo().get(0).getFromClerk().setName("ClerkName");
                x.getClientSubscriptionInfo().get(0).getFromClerk().setPublisher("username");
                x.getClientSubscriptionInfo().get(0).getFromClerk().setPassword("password");
                x.getClientSubscriptionInfo().get(0).getFromClerk().setNode(new Node());
                x.getClientSubscriptionInfo().get(0).getFromClerk().getNode().setClientName("clientname");
                x.getClientSubscriptionInfo().get(0).getFromClerk().getNode().setName("nodename");
                x.getClientSubscriptionInfo().get(0).getFromClerk().getNode().setDescription("description");
                x.getClientSubscriptionInfo().get(0).getFromClerk().getNode().setInquiryUrl("http://localhost:8080/juddiv3/services/inquiry");
                x.getClientSubscriptionInfo().get(0).getFromClerk().getNode().setPublishUrl("http://localhost:8080/juddiv3/services/publish");
                x.getClientSubscriptionInfo().get(0).getFromClerk().getNode().setCustodyTransferUrl("http://localhost:8080/juddiv3/services/custody-transfer");
                x.getClientSubscriptionInfo().get(0).getFromClerk().getNode().setSubscriptionUrl("http://localhost:8080/juddiv3/services/subscription");
                x.getClientSubscriptionInfo().get(0).getFromClerk().getNode().setSubscriptionListenerUrl("http://localhost:8080/juddiv3/services/subscription-listener");
                x.getClientSubscriptionInfo().get(0).getFromClerk().getNode().setJuddiApiUrl("http://localhost:8080/juddiv3/services/juddi-api");
                x.getClientSubscriptionInfo().get(0).getFromClerk().getNode().setReplicationUrl("http://localhost:8080/juddiv3/services/replication");
               
                x.getClientSubscriptionInfo().get(0).getToClerk().setName("ClerkName");
                x.getClientSubscriptionInfo().get(0).getToClerk().setPublisher("username");
                x.getClientSubscriptionInfo().get(0).getToClerk().setPassword("password");
                x.getClientSubscriptionInfo().get(0).getToClerk().setNode(new Node());
                x.getClientSubscriptionInfo().get(0).getToClerk().getNode().setClientName("clientname");
                x.getClientSubscriptionInfo().get(0).getToClerk().getNode().setName("nodename");
                x.getClientSubscriptionInfo().get(0).getToClerk().getNode().setDescription("description");
                x.getClientSubscriptionInfo().get(0).getToClerk().getNode().setInquiryUrl("http://localhost:8080/juddiv3/services/inquiry");
                x.getClientSubscriptionInfo().get(0).getToClerk().getNode().setPublishUrl("http://localhost:8080/juddiv3/services/publish");
View Full Code Here

        return chains;
    }

    public synchronized InvocationChain getBindingInvocationChain() {
        if (bindingInvocationChain == null) {
            bindingInvocationChain = new InvocationChainImpl(null, null, false, phaseManager, isAsyncInvocation());
            initServiceBindingInvocationChains();
        }
       
        // Init the operation invocation chains now. We know they will
        // be needed as well as the binding invocation chain and this
View Full Code Here

                    + " is found in service "
                    + serviceComponent.getURI()
                    + "#"
                    + service.getName());
            }
            InvocationChain chain = new InvocationChainImpl(operation, targetOperation, false, phaseManager, isAsyncInvocation());
            if (operation.isNonBlocking()) {
                addNonBlockingInterceptor(chain);
            }
            addServiceBindingInterceptor(chain, operation);
            addImplementationInterceptor(serviceComponent, service, chain, targetOperation);
            chains.add(chain);
           
            // Handle cases where the operation is an async server
            if( targetOperation.isAsyncServer() ) {
              createAsyncServerCallback();
            } // end if
        }

        wireProcessor.process(this);
       
        // If we have to support async and there is no binding chain
        // then set the response path to point directly to the
        // binding provided async response handler
        if (isAsyncInvocation() &&
            bindingInvocationChain == null){
            // fix up the operation chain response path to point back to the
            // binding provided async response handler
            ServiceBindingProvider serviceBindingProvider = getBindingProvider();
            if (serviceBindingProvider instanceof EndpointAsyncProvider){
                EndpointAsyncProvider asyncEndpointProvider = (EndpointAsyncProvider)serviceBindingProvider;
                InvokerAsyncResponse asyncResponseInvoker = asyncEndpointProvider.createAsyncResponseInvoker();
               
                for (InvocationChain chain : getInvocationChains()){
                    Invoker invoker = chain.getHeadInvoker();
                    if (invoker instanceof InterceptorAsync){
                        ((InterceptorAsync)invoker).setPrevious(asyncResponseInvoker);
                    } else {
                        //TODO - throw error once the old async code is removed
                    } // end if
View Full Code Here

        return chains;
    }

    public synchronized InvocationChain getBindingInvocationChain() {
        if (bindingInvocationChain == null) {
            bindingInvocationChain = new InvocationChainImpl(null, null, true, phaseManager, isAsyncInvocation());
            initReferenceBindingInvocationChains();
        }
        return bindingInvocationChain;
    }
View Full Code Here

                        + " is found in reference "
                        + getComponent().getURI()
                        + "#"
                        + reference.getName());
                }
                InvocationChain chain = new InvocationChainImpl(operation, targetOperation, true, phaseManager, isAsyncInvocation());
                if (operation.isNonBlocking()) {
                    addNonBlockingInterceptor(chain);
                }
                chainList.add(chain);
                addReferenceBindingInterceptor(chain, operation);
            }           
        }

        // Set the chains until it's fully populated. If we initialize too early, any exception could
        // leave this endpoint reference in a wrong state with an empty chain.
        chains = chainList;
        wireProcessor.process(this);
       
        if (isAsyncInvocation()){
            // Fix up all of the operation chain response paths to point back to the implementation provided
            // async response handler
            //ImplementationProvider implementationProvider = ((RuntimeComponent)getComponent()).getImplementationProvider();
          RuntimeComponentReference theReference = (RuntimeComponentReference)this.getReference();
          RuntimeComponent theComponent = theReference.getComponent();
            ImplementationProvider implementationProvider = theComponent.getImplementationProvider();
            if (implementationProvider instanceof ImplementationAsyncProvider){
                for (InvocationChain chain : getInvocationChains()){
                    InvokerAsyncResponse asyncResponseInvoker = ((ImplementationAsyncProvider)implementationProvider).createAsyncResponseInvoker(chain.getSourceOperation());
                    if (chain.getHeadInvoker() instanceof InterceptorAsync){
                        ((InterceptorAsync)chain.getHeadInvoker()).setPrevious(asyncResponseInvoker);
                    } else {
                        //TODO - throw error once the old async code is removed
                    } // end if
                } // end for
            } // end if
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.core.invocation.impl.InvocationChainImpl$Node

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.