FileDocCategorySizeDatePackage
WSDDTargetedChain.javaAPI DocApache Axis 1.45609Sat Apr 22 18:57:28 BST 2006org.apache.axis.deployment.wsdd

WSDDTargetedChain

public abstract class WSDDTargetedChain extends WSDDDeployableItem

Fields Summary
private WSDDRequestFlow
requestFlow
private WSDDResponseFlow
responseFlow
private QName
pivotQName
Constructors Summary
protected WSDDTargetedChain()

    
protected WSDDTargetedChain(Element e)

param
e (Element) XXX
throws
WSDDException XXX

        super(e);
        Element reqEl = getChildElement(e, ELEM_WSDD_REQFLOW);
        if (reqEl != null && reqEl.getElementsByTagName("*").getLength()>0) {
            requestFlow = new WSDDRequestFlow(reqEl);
        }
        Element respEl = getChildElement(e, ELEM_WSDD_RESPFLOW);
        if (respEl != null && respEl.getElementsByTagName("*").getLength()>0) {
            responseFlow = new WSDDResponseFlow(respEl);
        }
        
        // !!! pivot? use polymorphic method?
        String pivotStr = e.getAttribute(ATTR_PIVOT);
        if (pivotStr != null && !pivotStr.equals(""))
            pivotQName = XMLUtils.getQNameFromString(pivotStr, e);
        
    
Methods Summary
public voiddeployToRegistry(WSDDDeployment registry)

        // deploy any named subparts
        if (requestFlow != null) {
            requestFlow.deployToRegistry(registry);
        }
        
        if (responseFlow != null) {
            responseFlow.deployToRegistry(registry);
        }
    
public WSDDFaultFlowgetFaultFlow(javax.xml.namespace.QName name)

param
name XXX
return
XXX


        WSDDFaultFlow[] t = getFaultFlows();

        for (int n = 0; n < t.length; n++) {
            if (t[n].getQName().equals(name)) {
                return t[n];
            }
        }

        return null;
    
public WSDDFaultFlow[]getFaultFlows()

return
XXX

        return null;
    
public javax.xml.namespace.QNamegetPivotQName()

        return pivotQName;
    
public WSDDRequestFlowgetRequestFlow()

        return requestFlow;
    
public WSDDResponseFlowgetResponseFlow()

        return responseFlow;
    
public org.apache.axis.HandlermakeNewInstance(org.apache.axis.EngineConfiguration registry)

param
pivot XXX
param
registry XXX
return
XXX
throws
ConfigurationException XXX

        Handler reqHandler = null;

        WSDDChain req = getRequestFlow();
        if (req != null)
            reqHandler = req.getInstance(registry);
        
        Handler pivot = null;
        if (pivotQName != null) {
            if (URI_WSDD_JAVA.equals(pivotQName.getNamespaceURI())) {
                try {
                    pivot = (Handler)ClassUtils.forName(pivotQName.getLocalPart()).newInstance();
                } catch (InstantiationException e) {
                    throw new ConfigurationException(e);
                } catch (IllegalAccessException e) {
                    throw new ConfigurationException(e);
                } catch (ClassNotFoundException e) {
                    throw new ConfigurationException(e);
                }
            } else {
                pivot = registry.getHandler(pivotQName);
            }
        }
        
        Handler respHandler = null;
        WSDDChain resp = getResponseFlow();
        if (resp != null)
            respHandler = resp.getInstance(registry);

        Handler retVal = new org.apache.axis.SimpleTargetedChain(reqHandler, pivot,
                                                       respHandler);
        retVal.setOptions(getParametersTable());
        return retVal;
    
public voidsetPivotQName(javax.xml.namespace.QName pivotQName)

        this.pivotQName = pivotQName;
    
public voidsetRequestFlow(WSDDRequestFlow flow)

        requestFlow = flow;
    
public voidsetResponseFlow(WSDDResponseFlow flow)

        responseFlow = flow;
    
public voidsetType(java.lang.String type)

param
type XXX

        throw new WSDDException(Messages.getMessage(
                "noTypeSetting", getElementName().getLocalPart()));
    
public final voidwriteFlowsToContext(org.apache.axis.encoding.SerializationContext context)
Write this element out to a SerializationContext

        if (requestFlow != null) {
            requestFlow.writeToContext(context);
        }
        if (responseFlow != null) {
            responseFlow.writeToContext(context);
        }