/** * Get the future 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 future connection peer identity (not {@code null}) */ public IoFuture<ConnectionPeerIdentity> getFuturePeerIdentity(final URI location) { return doPrivileged((PrivilegedAction<IoFuture<ConnectionPeerIdentity>>) () -> getFuturePeerIdentityPrivileged(location)); }
/** * Get the future 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 future connection peer identity (not {@code null}) */ public IoFuture<ConnectionPeerIdentity> getFuturePeerIdentity(final URI location) { return doPrivileged((PrivilegedAction<IoFuture<ConnectionPeerIdentity>>) () -> getFuturePeerIdentityPrivileged(location)); }
/** * Get the future 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 future connection peer identity (not {@code null}) */ public IoFuture<ConnectionPeerIdentity> getFuturePeerIdentity(final URI location) { return doPrivileged((PrivilegedAction<IoFuture<ConnectionPeerIdentity>>) () -> getFuturePeerIdentityPrivileged(location)); }