Spring Framework RemoteInvocation - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework RemoteInvocation class.

This code example shows how to use the following methods:setArguments, setMethodName, setParameterTypes
 
    XmlRpcRequest request = new XmlRpcRequest();
    request.setMethodName(methodName);
    request.setParameters(parameters);
     
    RemoteInvocation invocation = new RemoteInvocation();
    invocation.setMethodName("getCustomerName");
    invocation.setParameterTypes(new Class[] { Long.class });
    invocation.setArguments(new Object[] { argument });
 
    // expectation: call the service method. 
    this.myService.getCustomerName(argument);
    this.myServiceControl.setReturnValue(customerName);
 
    // set the status of the mock object to "replay" 
    this.myServiceControl.replay();
 
    // execute the method to test. 
    Object result = this.serviceExporter.invoke(request);
 
6
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:invoke
                logger.debug("Set SecurityContextHolder to contain: " + request); 
            } 
        } 
 
        try { 
            return super.invoke(targetObject); 
        } finally { 
            SecurityContextHolder.clearContext(); 
 
            if (logger.isDebugEnabled()) { 
                logger.debug("Cleared SecurityContextHolder."); 
            } 
        } 
    } 
 
    /** 
     * Creates the server-side authentication request object. 
     */ 
    protected Authentication createAuthenticationRequest(String principal, String credentials) { 
        return new UsernamePasswordAuthenticationToken(principal, credentials); 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:addAttribute
	@Override 
	public RemoteInvocation createRemoteInvocation(MethodInvocation methodInvocation) { 
		RemoteInvocation retval = super.createRemoteInvocation(methodInvocation); 
 
		// Add the interface that is being used to access this service as an invocation attibute 
		retval.addAttribute(ATTRIBUTE_INTERFACE_NAME, this.getServiceInterface().getName()); 
 
		return retval; 
	} 
} 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
See Code Examples for Spring Framework RemoteInvocation Methods: