Java 8 RMISocketFactory - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 RMISocketFactory class.

This code example shows how to use the following methods:createServerSocket
        } 
        public ServerSocket createServerSocket(int port) throws IOException {
            if (port == 0) {
                port = PORT;
            } 
            return defaultFactory.createServerSocket(port);
        } 
    } 
} 
4
CodeRank
This code example shows how to use the following methods:createSocket
    private static class SF extends RMISocketFactory {
        private static RMISocketFactory defaultFactory =
            RMISocketFactory.getDefaultSocketFactory();
        SF() { } 
        public Socket createSocket(String host, int port) throws IOException {
            return defaultFactory.createSocket(host, port);
        } 
        public ServerSocket createServerSocket(int port) throws IOException {
            if (port == 0) {
                port = PORT;
            } 
            return defaultFactory.createServerSocket(port);
        } 
    } 
} 
3
CodeRank
This code example shows how to use the following methods:setSocketFactory
                if (factory == null) {
                    factory = new BackchannelSocketFactory
                        (getHostName(), netInterface);
                     
                    if (factory != null) {
                        RMISocketFactory.setSocketFactory(factory);
                        Syslog.info("RMI will now operate on "  
                                    + ((BackchannelSocketFactory)factory)
                                    .getInetAddress() 
                                    .getHostAddress()); 
                    } 
                } 
                mRMISocketFactory = factory;
            } 
            catch (IOException ioe) {
                Syslog.warn(ioe);
            } 
        } 
             
        Registry reg = null;
4
CodeRank
This code example shows how to use the following methods:createSocket
	public void createSocket() 
			throws Exception
	{ 
        TestTools.strict.commit(); 
		RMISocketFactory factory = getRmiSocketFactory();
		factory.createSocket("", 1);
	} 
 
	private RMISocketFactory getRmiSocketFactory()
	{ 
		return new RMISocketFactory()
		{ 
			@Override 
			public Socket createSocket(String host, int port)
					throws IOException
			{ 
				return null; 
			} 
 
			@Override 
3
CodeRank
See Code Examples for Java 8 RMISocketFactory Methods: