Example usage for org.springframework.remoting.support RemoteInvocation RemoteInvocation

List of usage examples for org.springframework.remoting.support RemoteInvocation RemoteInvocation

Introduction

In this page you can find the example usage for org.springframework.remoting.support RemoteInvocation RemoteInvocation.

Prototype

public RemoteInvocation(MethodInvocation methodInvocation) 

Source Link

Document

Create a new RemoteInvocation for the given AOP method invocation.

Usage

From source file:org.jdal.remoting.ReferenceRemoteInvocationFactory.java

/**
 * Replace remote clients in arguments with remote references.
 *//* w  ww .  j a v  a  2  s  .  c o  m*/
public RemoteInvocation createRemoteInvocation(MethodInvocation methodInvocation) {
    Object[] arguments = methodInvocation.getArguments();

    for (int i = 0; i < arguments.length; i++) {
        if (arguments[i] instanceof RemoteClient) {
            arguments[i] = ((RemoteClient) arguments[i]).getRemoteReference();
        }
    }

    return new RemoteInvocation(methodInvocation);
}