/** * Get the connection peer identity for a naming operation. If the connection is not configured as {@code immediate}, then the connection * will not actually be established until this method is called. The resultant connection should be closed and * discarded in the event of an error, in order to facilitate automatic reconnection. * * @param location a location from {@link ProviderEnvironment#getProviderUris()} (must not be {@code null}) * @return the connection peer identity (not {@code null}) * @throws NamingException if connecting, authenticating, or re-authenticating the peer failed */ public ConnectionPeerIdentity getPeerIdentityForNaming(final URI location) throws NamingException { Assert.checkNotNullParam("location", location); try { return getPeerIdentity(location); } catch (AuthenticationException e) { throw Messages.log.authenticationFailed(e); } catch (IOException e) { throw Messages.log.connectFailed(e); } }
/** * Get the connection peer identity for a naming operation. If the connection is not configured as {@code immediate}, then the connection * will not actually be established until this method is called. The resultant connection should be closed and * discarded in the event of an error, in order to facilitate automatic reconnection. * * @param location a location from {@link ProviderEnvironment#getProviderUris()} (must not be {@code null}) * @return the connection peer identity (not {@code null}) * @throws NamingException if connecting, authenticating, or re-authenticating the peer failed */ public ConnectionPeerIdentity getPeerIdentityForNaming(final URI location) throws NamingException { Assert.checkNotNullParam("location", location); try { return getPeerIdentity(location); } catch (AuthenticationException e) { throw Messages.log.authenticationFailed(e); } catch (IOException e) { throw Messages.log.connectFailed(e); } }
/** * Get the connection peer identity for a naming operation. If the connection is not configured as {@code immediate}, then the connection * will not actually be established until this method is called. The resultant connection should be closed and * discarded in the event of an error, in order to facilitate automatic reconnection. * * @param location a location from {@link ProviderEnvironment#getProviderUris()} (must not be {@code null}) * @return the connection peer identity (not {@code null}) * @throws NamingException if connecting, authenticating, or re-authenticating the peer failed */ public ConnectionPeerIdentity getPeerIdentityForNaming(final URI location) throws NamingException { Assert.checkNotNullParam("location", location); try { return getPeerIdentity(location); } catch (AuthenticationException e) { throw Messages.log.authenticationFailed(e); } catch (IOException e) { throw Messages.log.connectFailed(e); } }