diff --git a/src/main/java/org/jboss/remoting3/Endpoint.java b/src/main/java/org/jboss/remoting3/Endpoint.java index fbfbdccc8..c1826d29f 100644 --- a/src/main/java/org/jboss/remoting3/Endpoint.java +++ b/src/main/java/org/jboss/remoting3/Endpoint.java @@ -380,7 +380,19 @@ default IoFuture connect(URI destination) { */ IoFuture connect(URI destination, InetSocketAddress bindAddress, OptionMap connectOptions, SSLContext sslContext, AuthenticationConfiguration connectionConfiguration); - IoFuture connect(final URI destination, final OptionMap connectOptions, final CallbackHandler callbackHandler) throws IOException; + /** + * Open an unshared connection with a peer. Returns a future connection which may be used to cancel the connection attempt. + * This method does not block; use the return value to wait for a result if you wish to block. + *

+ * You must have the {@link RemotingPermission connect EndpointPermission} to invoke this method. + * + * @param destination the destination + * @param connectOptions options to configure this connection + * @param callbackHandler the local callback handler to use for authentication + * @return the future connection (not {@code null}) + */ + @Deprecated + IoFuture connect(URI destination, OptionMap connectOptions, CallbackHandler callbackHandler) throws IOException; /** * Register a connection provider for a URI scheme. The provider factory is called with the context which can