Example usage for org.apache.hadoop.ipc RPC waitForProxy

List of usage examples for org.apache.hadoop.ipc RPC waitForProxy

Introduction

In this page you can find the example usage for org.apache.hadoop.ipc RPC waitForProxy.

Prototype

public static <T> T waitForProxy(Class<T> protocol, long clientVersion, InetSocketAddress addr,
        Configuration conf, long connTimeout) throws IOException 

Source Link

Document

Get a proxy connection to a remote server

Usage

From source file:rpc.TestRPC.java

License:Apache License

@Test
public void testStandaloneClient() throws IOException {
    try {/* ww  w. j ava 2s  . c  o  m*/
        TestProtocol proxy = RPC.waitForProxy(TestProtocol.class, TestProtocol.versionID,
                new InetSocketAddress(ADDRESS, 20), conf, 15000L);
        proxy.echo("");
        fail("We should not have reached here");
    } catch (ConnectException ioe) {
        // this is what we expected
    }
}