File tree Expand file tree Collapse file tree 3 files changed +24
-3
lines changed
Expand file tree Collapse file tree 3 files changed +24
-3
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ plugins {
88 id ' signing'
99}
1010
11- def jarVersion = " 1.0.13 "
11+ def jarVersion = " 1.0.14 "
1212group = ' io.nats'
1313
1414def isMerge = System . getenv(" BUILD_EVENT" ) == " push"
Original file line number Diff line number Diff line change @@ -39,9 +39,30 @@ public class NatsRunnerUtils {
3939 * Build a standard nats://localhost:port uri
4040 * @param port the port
4141 * @return the uri
42+ * @deprecated Use {@link #getNatsLocalhostUri(int)} instead.
4243 */
44+ @ Deprecated
4345 public static String getURIForPort (int port ) {
44- return "nats://localhost:" + port ;
46+ return getLocalhostUri ("nats" , port );
47+ }
48+
49+ /**
50+ * Build a nats://localhost:port uri
51+ * @param port the port
52+ * @return the uri
53+ */
54+ public static String getNatsLocalhostUri (int port ) {
55+ return getLocalhostUri ("nats" , port );
56+ }
57+
58+ /**
59+ * Build a schema://localhost:port uri
60+ * @param schema the schema
61+ * @param port the port
62+ * @return the uri
63+ */
64+ public static String getLocalhostUri (String schema , int port ) {
65+ return schema + "://localhost:" + port ;
4566 }
4667
4768 /**
Original file line number Diff line number Diff line change @@ -434,7 +434,7 @@ public String getConfigFile() {
434434 * @return the uri string
435435 */
436436 public String getURI () {
437- return getURIForPort (_port );
437+ return getNatsLocalhostUri (_port );
438438 }
439439
440440 /**
You can’t perform that action at this time.
0 commit comments