GUACAMOLE-524: Declare deprecation of old connect() within guacamole-ext.

This commit is contained in:
Michael Jumper
2019-01-22 15:46:43 -08:00
parent a28b3c393a
commit feecb6301f
3 changed files with 34 additions and 26 deletions

View File

@@ -19,6 +19,7 @@
package org.apache.guacamole.net.auth;
import java.util.Collections;
import java.util.Map;
import org.apache.guacamole.GuacamoleException;
import org.apache.guacamole.net.GuacamoleTunnel;
@@ -38,6 +39,37 @@ public interface Connectable {
* copy of the interface such that they are binary compatible.
*/
/**
* Establishes a connection to guacd using the information associated with
* this object. The connection will be provided the given client
* information.
*
* @deprecated
* This function has been deprecated in favor of
* {@link #connect(org.apache.guacamole.protocol.GuacamoleClientInformation, java.util.Map)},
* which allows for connection parameter tokens to be injected and
* applied by cooperating extensions, replacing the functionality
* previously provided through the {@link org.apache.guacamole.token.StandardTokens}
* class. It continues to be defined on this interface for
* compatibility. <strong>New implementations should instead implement
* {@link #connect(org.apache.guacamole.protocol.GuacamoleClientInformation, java.util.Map)}.</strong>
*
* @param info
* Information associated with the connecting client.
*
* @return
* A fully-established GuacamoleTunnel.
*
* @throws GuacamoleException
* If an error occurs while connecting to guacd, or if permission to
* connect is denied.
*/
@Deprecated
default GuacamoleTunnel connect(GuacamoleClientInformation info)
throws GuacamoleException {
return this.connect(info, Collections.emptyMap());
}
/**
* Establishes a connection to guacd using the information associated with
* this object. The connection will be provided the given client

View File

@@ -196,31 +196,7 @@ public class SimpleConnection extends AbstractConnection {
// Do nothing - there are no attributes
}
/**
* Establishes a connection to guacd using the information associated with
* this object. The connection will be provided the given client
* information.
*
* <p>This definition is the legacy connect() definition from 1.0.0 and
* older. It is redefined here for the sake of ABI compatibility with
* 1.0.0 but is no longer defined within the
* {@link org.apache.guacamole.net.auth.Connectable} interface.
*
* @deprecated
* This definition exists solely for binary compatibility. It should
* never be used by new code. New implementations should instead use
* {@link #connect(org.apache.guacamole.protocol.GuacamoleClientInformation, java.util.Map)}.
*
* @param info
* Information associated with the connecting client.
*
* @return
* A fully-established GuacamoleTunnel.
*
* @throws GuacamoleException
* If an error occurs while connecting to guacd, or if permission to
* connect is denied.
*/
@Override
@Deprecated
public GuacamoleTunnel connect(GuacamoleClientInformation info)
throws GuacamoleException {

View File

@@ -46,7 +46,7 @@ public interface Connectable {
*
* <p>This definition is the legacy connect() definition from 1.0.0 and
* older. It is redefined here for the sake of ABI compatibility with
* 1.0.0 but is no longer defined within guacamole-ext.
* 1.0.0 but is deprecated within guacamole-ext.
*
* @deprecated
* This definition exists solely for binary compatibility. It should