Skip to content

Commit

Permalink
GUACAMOLE-XXX: Interim change for adding compatibility to API.
Browse files Browse the repository at this point in the history
  • Loading branch information
necouchman committed Jan 18, 2019
1 parent 78f1ae1 commit d53a6c3
Showing 1 changed file with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -56,6 +57,33 @@ public interface Connectable {
*/
public GuacamoleTunnel connect(GuacamoleClientInformation info,
Map<String, String> tokens) throws GuacamoleException;

/**
* This is a compatibility method for recent changes to the interface
* that calls the connect method with an empty set of tokens. Classes
* that use this interface should be updated to implement a connection
* method that accepts tokens.
*
* @param info
* Information associated with the connection client.
*
* @return
* A fully-established GuacamoleTunnel.
*
* @throws GuacamoleException
* If an error occurs while connecting to guacd, or if permission to
* connect is denied.
*
* @deprecated
* This method is deprecated and is provided for compatibility reasons.
* Implementations and users of this method should switch to the method
* that accepts tokens as a parameter.
*/
@Deprecated
default public GuacamoleTunnel connect(GuacamoleClientInformation info)
throws GuacamoleException {
return connect(info, Collections.emptyMap());
}

/**
* Returns the number of active connections associated with this object.
Expand Down

0 comments on commit d53a6c3

Please sign in to comment.