Package org.jboss.soa.esb.addressing

Examples of org.jboss.soa.esb.addressing.PortReference


     * @return The EPR copy.
     */
    public static EPR copyEPR(final EPR epr, final List<Extension> extensions)
    {
        final EPR copyEPR = new EPR(epr.getAddr().copy()) ;
        final PortReference addr = copyEPR.getAddr() ;
        if (extensions != null)
        {
            for(Extension extension: extensions)
            {
                if (!(EPR_TYPE.equals(extension.getTag()) &&
                    XMLUtil.JBOSSESB_NAMESPACE_URI.equals(extension.getURI()) &&
                    XMLUtil.JBOSSESB_PREFIX.equals(extension.getPrefix())))
                {
                    addr.addExtension(extension) ;
                }
            }
        }
        return copyEPR ;
    }
View Full Code Here


    private EPR createEpr(final Token token)
    {
        ProcessInstance instance = token.getProcessInstance();
       
        final EPR epr = new EPR();
        final PortReference portRef = epr.getAddr();
        final long nodeId = token.getNode().getId();
        final long tokenId = token.getId();
        final long processVersion = instance.getProcessDefinition().getVersion();
       
        portRef.addExtension(Constants.NODE_ID, String.valueOf(nodeId));
        portRef.addExtension(Constants.TOKEN_ID, String.valueOf(tokenId));
        portRef.addExtension(Constants.PROCESS_INSTANCE_ID, String.valueOf(instance.getId()));
       
        // Set the counter
        String counterName = Constants.PROCESS_NODE_VERSION_COUNTER  + nodeId + '_' + tokenId;
        portRef.addExtension(counterName, String.valueOf(processVersion));
       
        // The counterName variable is expected to be found in the process context.
        instance.getContextInstance().setVariableLocally(counterName, processVersion);
        return epr;
    }
View Full Code Here

TOP

Related Classes of org.jboss.soa.esb.addressing.PortReference

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.