Package org.apache.tuscany.sca.interfacedef

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


    private class MockContract<T> extends InterfaceContractImpl {
        public MockContract() {
        }

        public MockContract(String interfaceClass) {
            Interface jInterface = new MockInterface();
            setInterface(jInterface);
        }
View Full Code Here


     * @throws java.lang.Exception
     */
    @Before
    public void setUp() throws Exception {
        contract = new MockInterfaceContract();
        Interface i1 = new MockInterface();
        contract.setInterface(i1);
        Operation op1 = newOperation("op1");
        i1.getOperations().add(op1);
        Interface i2 = new MockInterface();
        contract.setCallbackInterface(i2);
        Operation callbackOp1 = newOperation("callbackOp1");
        i2.getOperations().add(callbackOp1);
    }
View Full Code Here

    private Invoker next;
    private List<Operation> operations;
   
    public HTTPDefaultServiceOperationSelectorInterceptor(RuntimeEndpoint endpoint) {
        Interface serviceInterface = endpoint.getService().getInterfaceContract().getInterface();
        this.operations = serviceInterface.getOperations();
    }
View Full Code Here

    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

        this.serviceName = serviceName;
    }

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

            return;
        }
        JavaImplementation javaImpl = (JavaImplementation)implementation;
        EndpointReference callbackEndpoint = wire.getSource().getCallbackEndpoint();
        if (callbackEndpoint != null) {
            Interface iface = callbackEndpoint.getContract().getInterfaceContract().getInterface();
            if (!supportsCallbackInterface(iface, javaImpl)) {
                // callback to this impl is not possible, so ensure a callback object is set
                for (InvocationChain chain : wire.getInvocationChains()) {
                    chain.addInterceptor(Phase.REFERENCE, new CallbackInterfaceInterceptor());
                }
View Full Code Here

            if (ifaceClass.isAssignableFrom(impl.getJavaClass())) {
                return true;
            }
        }
        try {
            Interface implType = javaInterfaceFactory.createJavaInterface(impl.getJavaClass());
            // Ignore the remotable/conversational testing
            implType.setRemotable(iface.isRemotable());
            implType.setConversational(iface.isConversational());
            return interfaceContractMapper.isCompatible(iface, implType);
        } catch (InvalidInterfaceException e) {
            logger.log(Level.WARNING, e.getMessage(), e);
            return false;
        }
View Full Code Here

        }
        return null;
    }

    public static boolean matches(Contract contract, Class<?> type) {
        Interface interface1 = contract.getInterfaceContract().getInterface();
        if (interface1 instanceof JavaInterface) {
            return type == ((JavaInterface)interface1).getJavaClass();
        } else {
            return false;
        }
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

    private class MockContract<T> extends InterfaceContractImpl {
        public MockContract() {
        }

        public MockContract(String interfaceClass) {
            Interface jInterface = new MockInterface();
            setInterface(jInterface);
        }
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.