changeset 811:ede3a59ff4f2 monetdbs

Add MapiSocket.connect(url, properties) method
author Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
date Tue, 12 Dec 2023 12:06:39 +0100 (16 months ago)
parents 425592a53fcd
children a090371d59c8
files src/main/java/org/monetdb/mcl/net/MapiSocket.java
diffstat 1 files changed, 5 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/org/monetdb/mcl/net/MapiSocket.java
+++ b/src/main/java/org/monetdb/mcl/net/MapiSocket.java
@@ -21,12 +21,7 @@ import java.net.*;
 import java.nio.charset.StandardCharsets;
 import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
+import java.util.*;
 import java.util.stream.Collectors;
 
 import org.monetdb.mcl.MCLException;
@@ -263,6 +258,10 @@ public final class MapiSocket {
 		return connect(target, null);
 	}
 
+	public List<String> connect(String url, Properties props) throws URISyntaxException, ValidationError, MCLException, MCLParseException, IOException {
+		return connect(new Target(url, props), null);
+	}
+
 	public List<String> connect(Target target, OptionsCallback callback) throws MCLException, MCLParseException, IOException {
 		// get rid of any earlier connection state, including the existing target
 		close();
@@ -695,7 +694,6 @@ public final class MapiSocket {
 		return target.isDebug();
 	}
 
-
 	/**
 	 * Inner class that is used to write data on a normal stream as a
 	 * blocked stream.  A call to the flush() method will write a