package base.connection;

import base.Driver;

/**
 * Manages a connection with an access ID and secret key.
 */
public class ConnectionUserAndKey extends ConnectionKey {

	/**
	 * Constructs this ConnectionUserAndKey.
	 * 
	 * @param accessId identifies the user with the server
	 * @param accessKey is the user's secret key for server authentication
	 * @param secure indicates if this connection is secure
	 * @param host is the host to connect to
	 * @param port is the host's port to connect to
	 * @param driver references the driver that owns this connection
	 */
	public ConnectionUserAndKey(String accessId, String accessKey, boolean secure,
			String host, int port, Driver driver) {
		super(accessKey, secure, host, port, driver);
		this.accessId = accessId;
	}

	/**
	 * Constructs this ConnectionUserAndKey with a default port.
	 * 
	 * @param accessId identifies the user with the server
	 * @param accessKey is the user's secret key for server authentication
	 * @param secure indicates if this connection is secure
	 * @param host is the host to connect to
	 * @param driver references the driver that owns this connection
	 */
	public ConnectionUserAndKey(String accessId, String accessKey, boolean secure,
			String host, Driver driver) {
		super(accessKey, secure, host, driver);
		this.accessId = accessId;
	}
}
