Package org.logicblaze.lingo

Examples of org.logicblaze.lingo.MethodMetadata


     *
     * @param invocation
     * @param requestMessage
     */
    protected void introduceRemoteReferences(LingoInvocation invocation, Message requestMessage) throws JMSException {
        MethodMetadata metadata = invocation.getMetadata();
        Object[] arguments = invocation.getArguments();
        Class[] parameterTypes = invocation.getParameterTypes();
        for (int i = 0; i < parameterTypes.length; i++) {
            if (metadata.isRemoteParameter(i)) {
                arguments[i] = createRemoteProxy(requestMessage, parameterTypes[i], arguments[i]);
            }
        }
    }
View Full Code Here


    public Object invoke(MethodInvocation methodInvocation) throws Throwable {
        if (AopUtils.isToStringMethod(methodInvocation.getMethod())) {
            return "JMS invoker proxy for service URL [" + getServiceUrl() + "]";
        }
        LingoInvocation invocation = (LingoInvocation) createRemoteInvocation(methodInvocation);
        MethodMetadata metadata = invocation.getMetadata();
        replaceRemoteReferences(invocation, metadata);
        try {
            Message requestMessage = marshaller.createRequestMessage(requestor, invocation);
            populateHeaders(requestMessage);
            if (metadata.isOneWay()) {
                requestor.oneWay(destination, requestMessage);
                return null;
            }
            else {
                Message response = requestor.request(destination, requestMessage);
View Full Code Here

    Marshaller marshaller = new XStreamMarshaller();

    public void testMarshall() throws Exception {
        Requestor requestor = createRequestor(getDestinationName());

        LingoInvocation invocation = new LingoInvocation("foo", new Class[0], new Object[0], new MethodMetadata(false));
        Message message = marshaller.createRequestMessage(requestor, invocation);

        assertTrue("Should have created a text message: " + message, message instanceof TextMessage);

        TextMessage textMessage = (TextMessage) message;
View Full Code Here

TOP

Related Classes of org.logicblaze.lingo.MethodMetadata

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.