RemoteClientTransport getRemoteTransport(ConnectionPeerIdentity peerIdentity) throws NamingException { final Endpoint endpoint = provider.getEndpoint(); if (endpoint == null) { throw Messages.log.noRemotingEndpoint(); } try { final Connection connection = peerIdentity.getConnection(); final IoFuture<RemoteClientTransport> future = RemoteClientTransport.SERVICE_HANDLE.getClientService(connection, OptionMap.EMPTY); try { return future.getInterruptibly(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); future.cancel(); throw Messages.log.operationInterrupted(); } } catch (IOException e) { if (e.getCause() instanceof NamingException) { throw (NamingException) e.getCause(); } throw Messages.log.connectFailed(e); } }
RemoteClientTransport getRemoteTransport(ConnectionPeerIdentity peerIdentity) throws NamingException { final Endpoint endpoint = provider.getEndpoint(); if (endpoint == null) { throw Messages.log.noRemotingEndpoint(); } try { final Connection connection = peerIdentity.getConnection(); final IoFuture<RemoteClientTransport> future = RemoteClientTransport.SERVICE_HANDLE.getClientService(connection, OptionMap.EMPTY); try { return future.getInterruptibly(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); future.cancel(); throw Messages.log.operationInterrupted(); } } catch (IOException e) { if (e.getCause() instanceof NamingException) { throw (NamingException) e.getCause(); } throw Messages.log.connectFailed(e); } }
RemoteClientTransport getRemoteTransport(ConnectionPeerIdentity peerIdentity) throws NamingException { final Endpoint endpoint = provider.getEndpoint(); if (endpoint == null) { throw Messages.log.noRemotingEndpoint(); } try { final Connection connection = peerIdentity.getConnection(); final IoFuture<RemoteClientTransport> future = RemoteClientTransport.SERVICE_HANDLE.getClientService(connection, OptionMap.EMPTY); try { return future.getInterruptibly(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); future.cancel(); throw Messages.log.operationInterrupted(); } } catch (IOException e) { if (e.getCause() instanceof NamingException) { throw (NamingException) e.getCause(); } throw Messages.log.connectFailed(e); } }