Spring Framework HttpInvokerProxyFactoryBean - 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 HttpInvokerProxyFactoryBean class.

This code example shows how to use the following methods:afterPropertiesSet, getObject, setServiceInterface, setServiceUrl
 
    @Test
    public void testHttpInvokeSpringService() throws Exception
    { 
        ComplexData cd = new ComplexData("Foo", new Integer(13));
        HttpInvokerProxyFactoryBean invoker = new HttpInvokerProxyFactoryBean();
        invoker.setServiceInterface(WorkInterface.class);
        invoker.setServiceUrl(SPRING_HTTP_ENDPOINT);
        invoker.afterPropertiesSet();
        WorkInterface worker = (WorkInterface)invoker.getObject();
        ComplexData data = worker.executeComplexity(cd);
        assertNotNull(data);
        assertEquals(data.getSomeString(), "Foo Received");
        assertEquals(data.getSomeInteger(), new Integer(14));
    } 
} 
7
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:setServiceInterface, setServiceUrl
@Configuration 
@ComponentScan("org.demo.demo") 
public class ApplicationConfig { 
    @Bean 
    public HttpInvokerProxyFactoryBean myService() {
        HttpInvokerProxyFactoryBean factory = new HttpInvokerProxyFactoryBean();
        factory.setServiceUrl("/svc/dummy");
        factory.setServiceInterface(MyService.class);
        return factory;
    } 
} 
6
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:createRemoteInvocation, getServiceInterface
 
	public static final String ATTRIBUTE_INTERFACE_NAME = ServiceRegistryHttpInvokerProxyFactoryBean.class.getName() + ".interface"; 
 
	@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
This code example shows how to use the following methods:setHttpInvokerRequestExecutor
public class BasicAuthHttpInvokerProxyFactoryBean extends HttpInvokerProxyFactoryBean implements AuthenticationAware {
 
    /** 
     * Constructor. Install the default executor. 
     */ 
    public BasicAuthHttpInvokerProxyFactoryBean() { 
        setHttpInvokerRequestExecutor( new BasicAuthHttpInvokerRequestExecutor() );
    } 
 
    // 
    // === AuthenticationAware implementation === 
    // 
 
    /** 
     * Handle a change in the current authentication token. Pass it along to the executor 
     * if it's of the proper type. 
     * @see BasicAuthHttpInvokerRequestExecutor 
     * @see AuthenticationAware#setAuthenticationToken(org.springframework.security.Authentication) 
     */ 
    public void setAuthenticationToken(Authentication authentication) {
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
See Code Examples for Spring Framework HttpInvokerProxyFactoryBean Methods: