Package org.apache.tuscany.sca.interfacedef

Examples of org.apache.tuscany.sca.interfacedef.Interface


    private static List<DataType> getDataTypes(Operation op, boolean useWrapper) {
        List<DataType> dataTypes = new ArrayList<DataType>();
        getDataTypes(dataTypes, op, useWrapper);
        // Adding classes referenced by @XmlSeeAlso in the java interface
        Interface interface1 = op.getInterface();
        if (interface1 instanceof JavaInterface) {
            JavaInterface javaInterface = (JavaInterface)interface1;
            Class<?>[] seeAlso = getSeeAlso(javaInterface.getJavaClass());
            if (seeAlso != null) {
                for (Class<?> cls : seeAlso) {
View Full Code Here


        this.serviceName = serviceName;
    }

    public WSDLDefinition getUserSpecifiedWSDLDefinition() {
        if (userSpecifiedWSDLDefinition == null) {
            Interface iface = bindingInterfaceContract.getInterface();
            if (iface instanceof WSDLInterface) {
                userSpecifiedWSDLDefinition = ((WSDLInterface)iface).getWsdlDefinition();
            }
        }
        return userSpecifiedWSDLDefinition;
View Full Code Here

            return findAsyncServerMethod( implClass, (JavaOperation)operation );
          } else {
            name = ((JavaOperation)operation).getJavaMethod().getName();
          } // end if
        }
        Interface interface1 = operation.getInterface();
        int numParams = operation.getInputType().getLogical().size();
       
        // Account for OUT-only in matching. (Should we cache this number in JavaOperation?)
        List<ParameterMode> parmModes = operation.getParameterModes();
        int numOutOnlyHolders = 0;
        for (ParameterMode mode : parmModes) {
            if (mode.equals(ParameterMode.OUT)) {
                numOutOnlyHolders++;
            }
        }
        numParams += numOutOnlyHolders;
       
        if (interface1 != null && interface1.isRemotable()) {
            List<Method> matchingMethods = new ArrayList<Method>();
            for (Method m : implClass.getMethods()) {
                if (m.getName().equals(name) && m.getParameterTypes().length == numParams) {
                    matchingMethods.add(m);
                }
View Full Code Here

        bind(endpointReference.getCompositeContext());

        RuntimeComponentReference reference = (RuntimeComponentReference)endpointReference.getReference();
        reference.setComponent((RuntimeComponent)endpointReference.getComponent());

        Interface i = reference.getInterfaceContract().getInterface();
        if (i instanceof JavaInterface) {
            JavaInterface javaInterface = (JavaInterface)i;
            if (javaInterface.isUnresolved()) {
                // Allow privileged access to get ClassLoader. Requires RuntimePermission in
                // security policy.
View Full Code Here

    @Override
    public void start() {
        String deployedURI = ServletFactory.registerServlet(this.servletHost);
        endpoint.setDeployedURI(deployedURI);
        final ComponentService service = this.endpoint.getService();
        final Interface serviceInterface = service.getInterfaceContract().getInterface();
        JavascriptGenerator.generateServiceProxy(service);
        for (final Operation operation : serviceInterface.getOperations()) {
            final String url = "/" + endpoint.getService().getName() + "/" + operation.getName();
            CometEndpointManager.add(url, endpoint);
            CometOperationManager.add(url, operation);
            JavascriptGenerator.generateMethodProxy(service, operation);
        }
View Full Code Here

            ic.setInterface(javaInterfaceFactory.createJavaInterface(businessInterface));
            return ic;
        }
        boolean compatible = false;
        if (interfaceContract != null && interfaceContract.getInterface() != null) {
            Interface interfaze = interfaceContract.getInterface();
            if (interfaze instanceof JavaInterface) {
                Class<?> cls = ((JavaInterface)interfaze).getJavaClass();
                if (businessInterface.isAssignableFrom(cls)) {
                    compatible = true;
                }
View Full Code Here

        }
    }

    protected Operation getOperation(AxisOperation axisOp) {
        String operationName = axisOp.getName().getLocalPart();
        Interface iface = wsBinding.getBindingInterfaceContract().getInterface();
        for (Operation op : iface.getOperations()) {
            if (op.getName().equalsIgnoreCase(operationName)) {
                return op;
            }
        }
        return null;
View Full Code Here

     * @throws CloneNotSupportedException
     * @throws InvalidInterfaceException
     */
    private InterfaceContract getInterfaceContract(InterfaceContract interfaceContract, Class<?> businessInterface)
        throws CloneNotSupportedException, InvalidInterfaceException {
        Interface interfaze = interfaceContract.getInterface();
        boolean compatible = false;
        if (interfaze instanceof JavaInterface) {
            Class<?> cls = ((JavaInterface)interfaze).getJavaClass();
            if (businessInterface.isAssignableFrom(cls)) {
                compatible = true;
View Full Code Here

     */
    private InterfaceContract getInterfaceContract(InterfaceContract interfaceContract, Class<?> businessInterface)
        throws CloneNotSupportedException, InvalidInterfaceException {
        boolean compatible = false;
        if (interfaceContract != null && interfaceContract.getInterface() != null) {
            Interface interfaze = interfaceContract.getInterface();
            if (interfaze instanceof JavaInterface) {
                Class<?> cls = ((JavaInterface)interfaze).getJavaClass();
                if (businessInterface.isAssignableFrom(cls)) {
                    compatible = true;
                }
View Full Code Here

                    binding = reference.getBinding(SCABinding.class);
                    if (binding == null) {
                        binding = reference.getBindings().get(0);
                    }
                }
                Interface i = reference.getInterfaceContract().getInterface();
                if (i instanceof JavaInterface) {
                    JavaInterface javaInterface = (JavaInterface)i;
                    if (javaInterface.isUnresolved()) {
                        // Allow privileged access to get ClassLoader. Requires RuntimePermission in
                        // security policy.
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.interfacedef.Interface

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.