src/main/java/js/container/RemoteInstanceFactory.java
@Override
	public <T> T getRemoteInstance(String implementationURL, Class<? super T> interfaceClass) throws UnsupportedProtocolException {
		if (implementationURL == null) {
			throw new UnsupportedProtocolException(new NullPointerException("Null remote implementation URL."));
		}
		String protocol = Strings.getProtocol(implementationURL);
		if (protocol == null) {
			throw new UnsupportedProtocolException(new MalformedURLException("Protocol not found on " + implementationURL));
		}

		RemoteFactory remoteFactory = remoteFactories.get(protocol);
		if (remoteFactory == null) {
			throw new UnsupportedProtocolException("No remote factory registered for protocol |%s|.", protocol);
		}
		return remoteFactory.getRemoteInstance(implementationURL, interfaceClass);
	}
@Override
	public <T> T getRemoteInstance(String implementationURL, Class<? super T> interfaceClass) throws UnsupportedProtocolException {
		if (implementationURL == null) {
			throw new UnsupportedProtocolException(new NullPointerException("Null remote implementation URL."));
		}
		String protocol = Strings.getProtocol(implementationURL);
		if (protocol == null) {
			throw new UnsupportedProtocolException(new MalformedURLException("Protocol not found on " + implementationURL));
		}

		RemoteFactory remoteFactory = remoteFactories.get(protocol);
		if (remoteFactory == null) {
			throw new UnsupportedProtocolException("No remote factory registered for protocol |%s|.", protocol);
		}
		return remoteFactory.getRemoteInstance(implementationURL, interfaceClass);
	}
Alternative to {@link #newInstance(ManagedClassSPI, Object...)} when implementation URL is obtained at run-time, perhaps
from user interface. Returned value is a Java proxy that delegates a HTTP-RMI client. This method is designed
specifically for {@link AppFactory#getRemoteInstance(String, Class)}.
<p>
This factory method does not check arguments validity. Both should be not null and interface class should be an actual
Java interface.

@param implementationURL the URL of remote implementation,
@param interfaceClass interface implemented by remote class.
@param <T> managed class implementation.
@return remote class proxy instance.
@throws UnsupportedProtocolException if URL protocol is not supported or arguments are otherwise not valid or null - in
which case root cause has details about erroneous argument.