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

This code example shows how to use the following methods:afterPropertiesSet, getObject, setServiceInterface, setServiceUrl
        } 
 
        // 构造对应的url 
        String serviceUrl = MessageFormat.format(RMI_SERVICE_URL, params.getIp(), String.valueOf(params.getPort()));
        // 自己实现的有连接池的Stub 
        RmiProxyFactoryBean proxy = new RmiProxyFactoryBean();
        proxy.setServiceUrl(serviceUrl);
        proxy.setServiceInterface(CommunicationEndpoint.class);
        proxy.afterPropertiesSet();
        return new RmiCommunicationConnection(params, (CommunicationEndpoint) proxy.getObject());// 创建链接
    } 
 
    @Override 
    public void releaseConnection(CommunicationConnection connection) {
        // do nothing 
    } 
 
} 
7
CodeRank
This code example shows how to use the following methods:afterPropertiesSet, getObject, setLookupStubOnStartup, setRefreshStubOnConnectFailure, setServiceInterface
			throw new MessageHandlingException(message, "Remote failure in RmiOutboundGateway: " + this.getComponentName(), e);
		} 
	} 
 
	private RequestReplyExchanger createProxy(String url) {
		RmiProxyFactoryBean proxyFactory = new RmiProxyFactoryBean();
		proxyFactory.setServiceInterface(RequestReplyExchanger.class);
		proxyFactory.setServiceUrl(url);
		proxyFactory.setLookupStubOnStartup(false);
		proxyFactory.setRefreshStubOnConnectFailure(true);
		proxyFactory.afterPropertiesSet();
		return (RequestReplyExchanger) proxyFactory.getObject();
	} 
 
} 
7
CodeRank
This code example shows how to use the following methods:afterPropertiesSet, getObject, setRefreshStubOnConnectFailure, setServiceInterface, setServiceUrl
    /** 
     * Utility method to lookup a remote stream peer over RMI. 
     */ 
    public static RemoteInputStreamServer obtain(String host, int port, String name) throws RemoteExceptionRmiProxyFactoryBean rmiProxyFactoryBean = new RmiProxyFactoryBean();
        rmiProxyFactoryBean.setServiceUrl("rmi://" + host + ":" + port + "/" + name);
        rmiProxyFactoryBean.setServiceInterface(RemoteInputStreamServer.class);
        rmiProxyFactoryBean.setRefreshStubOnConnectFailure(true);
        try 
        { 
            rmiProxyFactoryBean.afterPropertiesSet();
        } 
        catch (Exception e)
        { 
            throw new RemoteException("Error create rmi proxy");
        } 
        return (RemoteInputStreamServer) rmiProxyFactoryBean.getObject();
    } 
} 

7
CodeRank
This code example shows how to use the following methods:afterPropertiesSet, getObject, setServiceInterface, setServiceUrl
        return new SeleniumContext(webDriver(), baseUrl(), webDriverWaitTimeout()); 
    } 
 
    @Bean 
    public GlobalConfigurationManagementService globalConfigurationManagementService() { 
        RmiProxyFactoryBean rmiProxyFactoryBean = new RmiProxyFactoryBean();
        rmiProxyFactoryBean.setServiceUrl("rmi://127.0.0.1:1199/GlobalConfigurationManagementService");
        rmiProxyFactoryBean.setServiceInterface(GlobalConfigurationManagementService.class);
        rmiProxyFactoryBean.afterPropertiesSet();
        return (GlobalConfigurationManagementService) rmiProxyFactoryBean.getObject();
    } 
 
    @Bean 
    public DataManipulationService dataManipulationService() { 
        RmiProxyFactoryBean rmiProxyFactoryBean = new RmiProxyFactoryBean();
        rmiProxyFactoryBean.setServiceUrl("rmi://127.0.0.1:1199/DataManipulationService");
        rmiProxyFactoryBean.setServiceInterface(DataManipulationService.class);
        rmiProxyFactoryBean.afterPropertiesSet();
        return (DataManipulationService) rmiProxyFactoryBean.getObject();
    } 
6
CodeRank
See Code Examples for Spring Framework RmiProxyFactoryBean Methods: