java.rmi.UnknownHostException Java Examples

The following examples show how to use java.rmi.UnknownHostException. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RmiSupportTests.java    From spring-analysis-note with MIT License 4 votes vote down vote up
@Test
public void rmiProxyFactoryBeanWithUnknownHostException() throws Exception {
	doTestRmiProxyFactoryBeanWithException(UnknownHostException.class);
}
 
Example #2
Source File: RmiSupportTests.java    From spring-analysis-note with MIT License 4 votes vote down vote up
@Test
public void rmiProxyFactoryBeanWithUnknownHostExceptionAndRefresh() throws Exception {
	doTestRmiProxyFactoryBeanWithExceptionAndRefresh(UnknownHostException.class);
}
 
Example #3
Source File: RmiSupportTests.java    From spring-analysis-note with MIT License 4 votes vote down vote up
@Test
public void rmiProxyFactoryBeanWithBusinessInterfaceAndUnknownHostException() throws Exception {
	doTestRmiProxyFactoryBeanWithBusinessInterfaceAndException(
			UnknownHostException.class, RemoteConnectFailureException.class);
}
 
Example #4
Source File: RmiSupportTests.java    From spring-analysis-note with MIT License 4 votes vote down vote up
@Test
public void rmiProxyFactoryBeanWithBusinessInterfaceAndUnknownHostExceptionAndRefresh() throws Exception {
	doTestRmiProxyFactoryBeanWithBusinessInterfaceAndExceptionAndRefresh(
			UnknownHostException.class, RemoteConnectFailureException.class);
}
 
Example #5
Source File: RmiSupportTests.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
@Test
public void rmiProxyFactoryBeanWithBusinessInterfaceAndUnknownHostExceptionAndRefresh() throws Exception {
	doTestRmiProxyFactoryBeanWithBusinessInterfaceAndExceptionAndRefresh(
			UnknownHostException.class, RemoteConnectFailureException.class);
}
 
Example #6
Source File: RmiSupportTests.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
@Test
public void rmiProxyFactoryBeanWithBusinessInterfaceAndUnknownHostException() throws Exception {
	doTestRmiProxyFactoryBeanWithBusinessInterfaceAndException(
			UnknownHostException.class, RemoteConnectFailureException.class);
}
 
Example #7
Source File: RmiSupportTests.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
@Test
public void rmiProxyFactoryBeanWithUnknownHostExceptionAndRefresh() throws Exception {
	doTestRmiProxyFactoryBeanWithExceptionAndRefresh(UnknownHostException.class);
}
 
Example #8
Source File: RmiSupportTests.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
@Test
public void rmiProxyFactoryBeanWithUnknownHostException() throws Exception {
	doTestRmiProxyFactoryBeanWithException(UnknownHostException.class);
}
 
Example #9
Source File: RmiSupportTests.java    From java-technology-stack with MIT License 4 votes vote down vote up
@Test
public void rmiProxyFactoryBeanWithUnknownHostException() throws Exception {
	doTestRmiProxyFactoryBeanWithException(UnknownHostException.class);
}
 
Example #10
Source File: RmiSupportTests.java    From java-technology-stack with MIT License 4 votes vote down vote up
@Test
public void rmiProxyFactoryBeanWithUnknownHostExceptionAndRefresh() throws Exception {
	doTestRmiProxyFactoryBeanWithExceptionAndRefresh(UnknownHostException.class);
}
 
Example #11
Source File: RmiSupportTests.java    From java-technology-stack with MIT License 4 votes vote down vote up
@Test
public void rmiProxyFactoryBeanWithBusinessInterfaceAndUnknownHostException() throws Exception {
	doTestRmiProxyFactoryBeanWithBusinessInterfaceAndException(
			UnknownHostException.class, RemoteConnectFailureException.class);
}
 
Example #12
Source File: RmiSupportTests.java    From java-technology-stack with MIT License 4 votes vote down vote up
@Test
public void rmiProxyFactoryBeanWithBusinessInterfaceAndUnknownHostExceptionAndRefresh() throws Exception {
	doTestRmiProxyFactoryBeanWithBusinessInterfaceAndExceptionAndRefresh(
			UnknownHostException.class, RemoteConnectFailureException.class);
}
 
Example #13
Source File: RmiClientInterceptorUtils.java    From lams with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Determine whether the given RMI exception indicates a connect failure.
 * <p>Treats RMI's ConnectException, ConnectIOException, UnknownHostException,
 * NoSuchObjectException and StubNotFoundException as connect failure.
 * @param ex the RMI exception to check
 * @return whether the exception should be treated as connect failure
 * @see java.rmi.ConnectException
 * @see java.rmi.ConnectIOException
 * @see java.rmi.UnknownHostException
 * @see java.rmi.NoSuchObjectException
 * @see java.rmi.StubNotFoundException
 */
public static boolean isConnectFailure(RemoteException ex) {
	return (ex instanceof ConnectException || ex instanceof ConnectIOException ||
			ex instanceof UnknownHostException || ex instanceof NoSuchObjectException ||
			ex instanceof StubNotFoundException || ex.getCause() instanceof SocketException ||
			isCorbaConnectFailure(ex.getCause()));
}
 
Example #14
Source File: RmiClientInterceptorUtils.java    From spring4-understanding with Apache License 2.0 3 votes vote down vote up
/**
 * Determine whether the given RMI exception indicates a connect failure.
 * <p>Treats RMI's ConnectException, ConnectIOException, UnknownHostException,
 * NoSuchObjectException and StubNotFoundException as connect failure.
 * @param ex the RMI exception to check
 * @return whether the exception should be treated as connect failure
 * @see java.rmi.ConnectException
 * @see java.rmi.ConnectIOException
 * @see java.rmi.UnknownHostException
 * @see java.rmi.NoSuchObjectException
 * @see java.rmi.StubNotFoundException
 */
public static boolean isConnectFailure(RemoteException ex) {
	return (ex instanceof ConnectException || ex instanceof ConnectIOException ||
			ex instanceof UnknownHostException || ex instanceof NoSuchObjectException ||
			ex instanceof StubNotFoundException || ex.getCause() instanceof SocketException ||
			isCorbaConnectFailure(ex.getCause()));
}
 
Example #15
Source File: RegistryHandler.java    From jdk8u60 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns a "stub" for contacting a remote registry
 * on the specified host and port.
 *
 * @deprecated no replacement.  As of the Java 2 platform v1.2, RMI no
 * longer uses the <code>RegistryHandler</code> to obtain the registry's
 * stub.
 * @param host name of remote registry host
 * @param port remote registry port
 * @return remote registry stub
 * @throws RemoteException if a remote error occurs
 * @throws UnknownHostException if unable to resolve given hostname
 */
@Deprecated
Registry registryStub(String host, int port)
    throws RemoteException, UnknownHostException;
 
Example #16
Source File: RegistryHandler.java    From jdk8u-dev-jdk with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns a "stub" for contacting a remote registry
 * on the specified host and port.
 *
 * @deprecated no replacement.  As of the Java 2 platform v1.2, RMI no
 * longer uses the <code>RegistryHandler</code> to obtain the registry's
 * stub.
 * @param host name of remote registry host
 * @param port remote registry port
 * @return remote registry stub
 * @throws RemoteException if a remote error occurs
 * @throws UnknownHostException if unable to resolve given hostname
 */
@Deprecated
Registry registryStub(String host, int port)
    throws RemoteException, UnknownHostException;
 
Example #17
Source File: RegistryHandler.java    From jdk-1.7-annotated with Apache License 2.0 2 votes vote down vote up
/**
 * Returns a "stub" for contacting a remote registry
 * on the specified host and port.
 *
 * @deprecated no replacement.  As of the Java 2 platform v1.2, RMI no
 * longer uses the <code>RegistryHandler</code> to obtain the registry's
 * stub.
 * @param host name of remote registry host
 * @param port remote registry port
 * @return remote registry stub
 * @throws RemoteException if a remote error occurs
 * @throws UnknownHostException if unable to resolve given hostname
 */
@Deprecated
Registry registryStub(String host, int port)
    throws RemoteException, UnknownHostException;
 
Example #18
Source File: RegistryHandler.java    From jdk8u-jdk with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns a "stub" for contacting a remote registry
 * on the specified host and port.
 *
 * @deprecated no replacement.  As of the Java 2 platform v1.2, RMI no
 * longer uses the <code>RegistryHandler</code> to obtain the registry's
 * stub.
 * @param host name of remote registry host
 * @param port remote registry port
 * @return remote registry stub
 * @throws RemoteException if a remote error occurs
 * @throws UnknownHostException if unable to resolve given hostname
 */
@Deprecated
Registry registryStub(String host, int port)
    throws RemoteException, UnknownHostException;
 
Example #19
Source File: RegistryHandler.java    From jdk8u_jdk with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns a "stub" for contacting a remote registry
 * on the specified host and port.
 *
 * @deprecated no replacement.  As of the Java 2 platform v1.2, RMI no
 * longer uses the <code>RegistryHandler</code> to obtain the registry's
 * stub.
 * @param host name of remote registry host
 * @param port remote registry port
 * @return remote registry stub
 * @throws RemoteException if a remote error occurs
 * @throws UnknownHostException if unable to resolve given hostname
 */
@Deprecated
Registry registryStub(String host, int port)
    throws RemoteException, UnknownHostException;
 
Example #20
Source File: RegistryHandler.java    From openjdk-8 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns a "stub" for contacting a remote registry
 * on the specified host and port.
 *
 * @deprecated no replacement.  As of the Java 2 platform v1.2, RMI no
 * longer uses the <code>RegistryHandler</code> to obtain the registry's
 * stub.
 * @param host name of remote registry host
 * @param port remote registry port
 * @return remote registry stub
 * @throws RemoteException if a remote error occurs
 * @throws UnknownHostException if unable to resolve given hostname
 */
@Deprecated
Registry registryStub(String host, int port)
    throws RemoteException, UnknownHostException;
 
Example #21
Source File: RegistryHandler.java    From jdk1.8-source-analysis with Apache License 2.0 2 votes vote down vote up
/**
 * Returns a "stub" for contacting a remote registry
 * on the specified host and port.
 *
 * @deprecated no replacement.  As of the Java 2 platform v1.2, RMI no
 * longer uses the <code>RegistryHandler</code> to obtain the registry's
 * stub.
 * @param host name of remote registry host
 * @param port remote registry port
 * @return remote registry stub
 * @throws RemoteException if a remote error occurs
 * @throws UnknownHostException if unable to resolve given hostname
 */
@Deprecated
Registry registryStub(String host, int port)
    throws RemoteException, UnknownHostException;
 
Example #22
Source File: RegistryHandler.java    From dragonwell8_jdk with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns a "stub" for contacting a remote registry
 * on the specified host and port.
 *
 * @deprecated no replacement.  As of the Java 2 platform v1.2, RMI no
 * longer uses the <code>RegistryHandler</code> to obtain the registry's
 * stub.
 * @param host name of remote registry host
 * @param port remote registry port
 * @return remote registry stub
 * @throws RemoteException if a remote error occurs
 * @throws UnknownHostException if unable to resolve given hostname
 */
@Deprecated
Registry registryStub(String host, int port)
    throws RemoteException, UnknownHostException;
 
Example #23
Source File: RegistryHandler.java    From TencentKona-8 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns a "stub" for contacting a remote registry
 * on the specified host and port.
 *
 * @deprecated no replacement.  As of the Java 2 platform v1.2, RMI no
 * longer uses the <code>RegistryHandler</code> to obtain the registry's
 * stub.
 * @param host name of remote registry host
 * @param port remote registry port
 * @return remote registry stub
 * @throws RemoteException if a remote error occurs
 * @throws UnknownHostException if unable to resolve given hostname
 */
@Deprecated
Registry registryStub(String host, int port)
    throws RemoteException, UnknownHostException;
 
Example #24
Source File: RmiClientInterceptorUtils.java    From java-technology-stack with MIT License 2 votes vote down vote up
/**
 * Determine whether the given RMI exception indicates a connect failure.
 * <p>Treats RMI's ConnectException, ConnectIOException, UnknownHostException,
 * NoSuchObjectException and StubNotFoundException as connect failure.
 * @param ex the RMI exception to check
 * @return whether the exception should be treated as connect failure
 * @see java.rmi.ConnectException
 * @see java.rmi.ConnectIOException
 * @see java.rmi.UnknownHostException
 * @see java.rmi.NoSuchObjectException
 * @see java.rmi.StubNotFoundException
 */
public static boolean isConnectFailure(RemoteException ex) {
	return (ex instanceof ConnectException || ex instanceof ConnectIOException ||
			ex instanceof UnknownHostException || ex instanceof NoSuchObjectException ||
			ex instanceof StubNotFoundException || ex.getCause() instanceof SocketException);
}
 
Example #25
Source File: RegistryHandler.java    From JDKSourceCode1.8 with MIT License 2 votes vote down vote up
/**
 * Returns a "stub" for contacting a remote registry
 * on the specified host and port.
 *
 * @deprecated no replacement.  As of the Java 2 platform v1.2, RMI no
 * longer uses the <code>RegistryHandler</code> to obtain the registry's
 * stub.
 * @param host name of remote registry host
 * @param port remote registry port
 * @return remote registry stub
 * @throws RemoteException if a remote error occurs
 * @throws UnknownHostException if unable to resolve given hostname
 */
@Deprecated
Registry registryStub(String host, int port)
    throws RemoteException, UnknownHostException;
 
Example #26
Source File: RegistryHandler.java    From openjdk-8-source with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns a "stub" for contacting a remote registry
 * on the specified host and port.
 *
 * @deprecated no replacement.  As of the Java 2 platform v1.2, RMI no
 * longer uses the <code>RegistryHandler</code> to obtain the registry's
 * stub.
 * @param host name of remote registry host
 * @param port remote registry port
 * @return remote registry stub
 * @throws RemoteException if a remote error occurs
 * @throws UnknownHostException if unable to resolve given hostname
 */
@Deprecated
Registry registryStub(String host, int port)
    throws RemoteException, UnknownHostException;
 
Example #27
Source File: RegistryHandler.java    From hottub with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns a "stub" for contacting a remote registry
 * on the specified host and port.
 *
 * @deprecated no replacement.  As of the Java 2 platform v1.2, RMI no
 * longer uses the <code>RegistryHandler</code> to obtain the registry's
 * stub.
 * @param host name of remote registry host
 * @param port remote registry port
 * @return remote registry stub
 * @throws RemoteException if a remote error occurs
 * @throws UnknownHostException if unable to resolve given hostname
 */
@Deprecated
Registry registryStub(String host, int port)
    throws RemoteException, UnknownHostException;
 
Example #28
Source File: RegistryHandler.java    From Java8CN with Apache License 2.0 2 votes vote down vote up
/**
 * Returns a "stub" for contacting a remote registry
 * on the specified host and port.
 *
 * @deprecated no replacement.  As of the Java 2 platform v1.2, RMI no
 * longer uses the <code>RegistryHandler</code> to obtain the registry's
 * stub.
 * @param host name of remote registry host
 * @param port remote registry port
 * @return remote registry stub
 * @throws RemoteException if a remote error occurs
 * @throws UnknownHostException if unable to resolve given hostname
 */
@Deprecated
Registry registryStub(String host, int port)
    throws RemoteException, UnknownHostException;
 
Example #29
Source File: RegistryHandler.java    From jdk8u-jdk with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns a "stub" for contacting a remote registry
 * on the specified host and port.
 *
 * @deprecated no replacement.  As of the Java 2 platform v1.2, RMI no
 * longer uses the <code>RegistryHandler</code> to obtain the registry's
 * stub.
 * @param host name of remote registry host
 * @param port remote registry port
 * @return remote registry stub
 * @throws RemoteException if a remote error occurs
 * @throws UnknownHostException if unable to resolve given hostname
 */
@Deprecated
Registry registryStub(String host, int port)
    throws RemoteException, UnknownHostException;
 
Example #30
Source File: RegistryHandler.java    From openjdk-jdk9 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns a "stub" for contacting a remote registry
 * on the specified host and port.
 *
 * @deprecated no replacement.  As of the Java 2 platform v1.2, RMI no
 * longer uses the <code>RegistryHandler</code> to obtain the registry's
 * stub.
 * @param host name of remote registry host
 * @param port remote registry port
 * @return remote registry stub
 * @throws RemoteException if a remote error occurs
 * @throws UnknownHostException if unable to resolve given hostname
 */
@Deprecated
Registry registryStub(String host, int port)
    throws RemoteException, UnknownHostException;