Examples of Interface


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

                isOSGiToOSGiWire = true;
                   
                // If the target component is stateless, use a proxy to create a new service each time
                if (!implProvider.getScope().equals(Scope.COMPOSITE)) createProxy = true;
               
                Interface interfaze = wire.getTarget().getInterfaceContract().getInterface();
               
                // If the target interface is remotable, create a proxy to support pass-by-value semantics
                // AllowsPassByReference is not detected until the target instance is obtained.
                if (interfaze.isRemotable())
                    createProxy = true;
                   
                // If any of the operations in the target interface is non-blocking, create a proxy
                List<Operation> ops = interfaze.getOperations();
                for (Operation op : ops) {
                    if (op.isNonBlocking())
                        createProxy = true;
                }
                   
View Full Code Here

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

                   
                    isOSGiToOSGiWire[index] = wire.getTarget().getComponent() != null &&
                            wire.getTarget().getComponent().getImplementationProvider()
                            instanceof OSGiImplementationProvider;
                           
                    Interface refInterface = reference.getInterfaceContract().getInterface();
                    if (refInterface instanceof JavaInterface) {
                        interfaceClasses[index] = ((JavaInterface)refInterface).getJavaClass();
                   
                        if (!isOSGiToOSGiWire[index])
                            resolveWireCreateDummyBundles(interfaceClasses[index]);

                    }
                   
                    if (!resolvedWires.contains(wire)) {
                        resolvedWires.add(wire);                      
                    }
                    else
                        wireResolved[index] = true;
                   
                    index++;
                }
                for (ComponentService service : runtimeComponent.getServices()) {
                    Interface callbackInterface = service.getInterfaceContract().getCallbackInterface();
                    if (callbackInterface instanceof JavaInterface) {
                        interfaceClasses[index] = ((JavaInterface)callbackInterface).getJavaClass();
                       
                        resolveWireCreateDummyBundles(interfaceClasses[index]);
                    }
View Full Code Here

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

    }
   
    public Invoker createTargetInvoker(RuntimeComponentService service, Operation operation)  {
      
       
        Interface serviceInterface = operation.getInterface();
        boolean isRemotable = serviceInterface.isRemotable();


        Invoker invoker = new OSGiTargetInvoker(operation, this, service);
        if (isRemotable) {
            return new OSGiRemotableInvoker(osgiAnnotations, dataBindingRegistry, operation, this, service);
View Full Code Here

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

        this.binding = endpoint.getBinding();
        this.jaxrs = isJAXRSResource();
    }

    private boolean isJAXRSResource() {
        Interface interfaze = endpoint.getComponentServiceInterfaceContract().getInterface();
        if (interfaze instanceof JavaInterface) {
            if (JAXRSHelper.isJAXRSResource(((JavaInterface)interfaze).getJavaClass())) {
                return true;
            }
        }
View Full Code Here

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

        this.binding = endpoint.getBinding();
        this.jaxrs = isJAXRSResource();
    }

    private boolean isJAXRSResource() {
        Interface interfaze = endpoint.getComponentServiceInterfaceContract().getInterface();
        if (interfaze instanceof JavaInterface) {
            if (JAXRSHelper.isJAXRSResource(((JavaInterface)interfaze).getJavaClass())) {
                return true;
            }
        }
View Full Code Here

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

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

        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

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

            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

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

            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

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

            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
TOP
Copyright © 2018 www.massapi.com. 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.