Package org.apache.tuscany.sca.interfacedef

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


    private Map<Operation, OperationTypes> operationsCache = new HashMap<Operation, OperationTypes>();

    public ComponentInvocationProxy(RuntimeEndpoint wire, Class javaClass)
        throws RequestConfigurationException {
        this.wire = wire;
        Interface interfaze = wire.getComponentTypeServiceInterfaceContract().getInterface();
        operationsMap = OperationMapper.mapOperationNameToMethod(javaClass);
        operationMethodMapping = OperationMapper.mapOperationToMethod(interfaze.getOperations(), javaClass);
        methodOperationMapping = OperationMapper.mapMethodToOperation(interfaze.getOperations(), javaClass);
        cacheOperationTypes(interfaze.getOperations());
    }
View Full Code Here


        if (businessInterface == null) {
            return interfaceContract;
        }
        boolean compatible = false;
        if (interfaceContract != null && interfaceContract.getInterface() != null) {
            Interface interfaze = interfaceContract.getInterface();
            if (interfaze instanceof JavaInterface) {
                Class<?> cls = ((JavaInterface)interfaze).getJavaClass();
                if (cls != null && businessInterface.isAssignableFrom(cls)) {
                    compatible = true;
                }
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

            if (scopeContainer != null && currentConversationID != null) {
                scopeContainer.addWrapperReference(currentConversationID, conversation.getConversationID());
            }
        }

        Interface interfaze = msg.getOperation().getInterface();
        if (callbackObject != null) {
            if (callbackObject instanceof ServiceReference) {
                EndpointReference callbackRef = ((CallableReferenceImpl)callbackObject).getEndpointReference();
                parameters.setCallbackReference(callbackRef);
            } else {
                if (interfaze != null) {
                    if (!interfaze.isConversational()) {
                        throw new IllegalArgumentException(
                                                           "Callback object for stateless callback is not a ServiceReference");
                    } else {
                        ScopeContainer scopeContainer = getConversationalScopeContainer(wire);
                        if (scopeContainer != null) {
View Full Code Here

            if (scopeContainer != null) {
                scopeContainer.addWrapperReference(currentConversationID, parameters.getConversationID());
            }
        }

        Interface interfaze = msg.getOperation().getInterface();
        if (callbackObject != null) {
            if (callbackObject instanceof ServiceReference) {
                EndpointReference callbackRef = ((CallableReferenceImpl)callbackObject).getEndpointReference();
                parameters.setCallbackReference(callbackRef);
            } else {
                if (interfaze != null) {
                    if (!interfaze.isConversational()) {
                        throw new IllegalArgumentException(
                                                           "Callback object for stateless callback is not a ServiceReference");
                    } else {
                        ScopeContainer scopeContainer = getConversationalScopeContainer(msg);
                        if (scopeContainer != null) {
View Full Code Here

    }

   
    private void initializeInvocation() {
     
        Interface interfaze = operation.getInterface();
        if(interfaze instanceof WSDLInterface){
            WSDLInterface wsdlInterface = null;
            wsdlInterface = (WSDLInterface) interfaze;
           
            Service serviceDefinition = (Service) wsdlInterface.getWsdlDefinition().getDefinition().getAllServices().values().iterator().next();
View Full Code Here

            // Try to match references by type
            Map<String, JavaElementImpl> refMembers = impl.getReferenceMembers();
            for (Reference ref : impl.getReferences()) {
                if (ref.getInterfaceContract() != null) {
                    Interface i = ref.getInterfaceContract().getInterface();
                    if (i instanceof JavaInterface) {
                        Class<?> type = ((JavaInterface)i).getJavaClass();
                        if (!refMembers.containsKey(ref.getName())) {
                            JavaElementImpl e = getMemeber(impl, ref.getName(), type);
                            if (e != null) {
View Full Code Here

     * Returns true if the given operation is defined in the collection of
     * service interfaces
     */
    private boolean isInServiceInterface(Method operation, List<org.apache.tuscany.sca.assembly.Service> services) {
        for (org.apache.tuscany.sca.assembly.Service service : services) {
            Interface interface1 = service.getInterfaceContract().getInterface();
            if (interface1 instanceof JavaInterface) {
                Class<?> clazz = ((JavaInterface)interface1).getJavaClass();
                if (isMethodMatched(clazz, operation)) {
                    return true;
                }
View Full Code Here

        if (callInterface.getCallbackClass() != null) {
            JavaInterface callbackInterface = javaFactory.createJavaInterface(callInterface.getCallbackClass());
            service.getInterfaceContract().setCallbackInterface(callbackInterface);
        }

        Interface javaInterface = service.getInterfaceContract().getInterface();
        javaInterface.setRemotable(interfaze.getAnnotation(Remotable.class) != null);
        service.getInterfaceContract().setInterface(javaInterface);
        return service;
    }
View Full Code Here

            // set wsdl namespace prefix on the definition
            newDef.addNamespace("wsdl", "http://schemas.xmlsoap.org/wsdl/");

            // import the service or reference interface portType
            List<WSDLDefinition> imports = new ArrayList<WSDLDefinition>();
            Interface interfaze = wsBinding.getBindingInterfaceContract().getInterface();
            if (interfaze instanceof WSDLInterface) {
                PortType portType = ((WSDLInterface)interfaze).getPortType();
                boolean ok = importPortType(portType, wsdlDefinition, newDef, imports);
                if (!ok) {
                    error(monitor, "PortTypeNotFound", wsBinding, portType.getQName().toString(),
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.