-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #200 from nats-io/v2.4.0
V2.4.0
- v2.4.0
- before-extract-libraries
- 2.20.5
- 2.20.4
- 2.20.3
- 2.20.2
- 2.20.1
- 2.20.0
- 2.19.1
- 2.19.0
- 2.18.1
- 2.18.0
- 2.17.7
- 2.17.6
- 2.17.5
- 2.17.4
- 2.17.3
- 2.17.2
- 2.17.1
- 2.17.0
- 2.16.14
- 2.16.13
- 2.16.12
- 2.16.11
- 2.16.10
- 2.16.9
- 2.16.8
- 2.16.7
- 2.16.6
- 2.16.5
- 2.16.4
- 2.16.3
- 2.16.2
- 2.16.1
- 2.16.0
- 2.15.7
- 2.15.6
- 2.15.5
- 2.15.4
- 2.15.3
- 2.15.2
- 2.15.1
- 2.15.0
- 2.14.2
- 2.14.1
- 2.14.0
- 2.13.2
- 2.13.1
- 2.13.0
- 2.12.0
- 2.11.6
- 2.11.5
- 2.11.5.beta3
- 2.11.4
- 2.11.3
- 2.11.2
- 2.11.1
- 2.11.0
- 2.10.3
- 2.10.2
- 2.10.0
- 2.9.0-beta-2
- 2.9.0-beta-1
- 2.8.0
- 2.7.0
- 2.6.8
- 2.6.7
- 2.6.6
- 2.6.5
- 2.6.4
- 2.6.3
- 2.6.2
- 2.6.1
- 2.6.0
- 2.5.2
- 2.5.1
- 2.5
- 2.4.6
- 2.4.5
- 2.4.4
- 2.4.3
- 2.4.2
- 2.4.1
Showing
53 changed files
with
1,248 additions
and
174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,4 +68,8 @@ public byte[] sign(byte[] nonce) { | |
return null; | ||
} | ||
} | ||
|
||
public char[] getJWT() { | ||
return null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// Copyright 2018 The NATS Authors | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at: | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package io.nats.examples; | ||
|
||
import java.time.Duration; | ||
|
||
import io.nats.client.AuthHandler; | ||
import io.nats.client.Connection; | ||
import io.nats.client.ConnectionListener; | ||
import io.nats.client.Nats; | ||
import io.nats.client.Options; | ||
|
||
public class ExampleUtils { | ||
public static Options createExampleOptions(String server, boolean allowReconnect) throws Exception { | ||
Options.Builder builder = new Options.Builder(). | ||
server(server). | ||
connectionTimeout(Duration.ofSeconds(5)). | ||
pingInterval(Duration.ofSeconds(10)). | ||
reconnectWait(Duration.ofSeconds(1)). | ||
connectionListener(new ConnectionListener(){ | ||
public void connectionEvent(Connection conn, Events type) { | ||
System.out.println("Status change "+type); | ||
} | ||
}); | ||
|
||
if (!allowReconnect) { | ||
builder = builder.noReconnect(); | ||
} else { | ||
builder = builder.maxReconnects(-1); | ||
} | ||
|
||
if (System.getenv("NATS_NKEY") != null && System.getenv("NATS_NKEY") != "") { | ||
AuthHandler handler = new ExampleAuthHandler(System.getenv("NATS_NKEY")); | ||
builder.authHandler(handler); | ||
} else if (System.getenv("NATS_CREDS") != null && System.getenv("NATS_CREDS") != "") { | ||
builder.authHandler(Nats.credentials(System.getenv("NATS_CREDS"))); | ||
} | ||
|
||
return builder.build(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.