/** * Get the connection peer identity. 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 AuthenticationException if authenticating or re-authenticating the peer failed * @throws IOException if connecting the peer failed */ public ConnectionPeerIdentity getPeerIdentity(final URI location) throws IOException { Assert.checkNotNullParam("location", location); return getFuturePeerIdentity(location).get(); }
/** * Get the connection peer identity. 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 AuthenticationException if authenticating or re-authenticating the peer failed * @throws IOException if connecting the peer failed */ public ConnectionPeerIdentity getPeerIdentity(final URI location) throws IOException { Assert.checkNotNullParam("location", location); return getFuturePeerIdentity(location).get(); }
/** * Get the connection peer identity. 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 AuthenticationException if authenticating or re-authenticating the peer failed * @throws IOException if connecting the peer failed */ public ConnectionPeerIdentity getPeerIdentity(final URI location) throws IOException { Assert.checkNotNullParam("location", location); return getFuturePeerIdentity(location).get(); }