Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
625dfce
chore: tidy spring websocket client files
tcheeric Oct 3, 2025
2d6a242
docs: add spring subscription example client
tcheeric Oct 3, 2025
924599e
fix: avoid blocking subscription close
tcheeric Oct 3, 2025
4b0a175
chore: add .qodana to gitignore
Oct 3, 2025
932d643
refactor(api): enable non-blocking subscription handling
Oct 3, 2025
d2635dc
refactor(api): restore override for decode method
Oct 3, 2025
14ad06b
docs(bech32): improve method documentation for encode and decode
Oct 3, 2025
e34c7c8
refactor(api): make classTypeTagsMap final for immutability
Oct 3, 2025
5a521f2
docs(schnorr): enhance method documentation for sign and verify
Oct 3, 2025
ab99fe4
refactor(api): remove unused id field from ZapRequest
Oct 3, 2025
b811357
refactor(api): remove redundant assertion handling in product event v…
Oct 3, 2025
22d3f93
refactor(api): restore override annotation for decode method
Oct 3, 2025
0bd966c
refactor(api): restore override annotation for decode method
Oct 3, 2025
024ec93
refactor(api): restore override annotation for decode method
Oct 3, 2025
ba98567
refactor(api): suppress resource warning for HttpClient instantiation
Oct 3, 2025
33543a3
refactor(api): restore override annotations and clean up method docum…
Oct 3, 2025
d0818b5
refactor(api): make relayName and relayUri final fields
Oct 3, 2025
74858ea
refactor: deleted files
Oct 3, 2025
03a405f
refactor(api): simplify tag addition logic in CalendarContent
Oct 3, 2025
5968fcc
refactor: update pull request template to clarify purpose section
Oct 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor(api): make relayName and relayUri final fields
- Updated relayName and relayUri to be final, ensuring they are immutable.
- This change enhances the integrity of the WebSocketClientHandler class.
  • Loading branch information
erict875 committed Oct 3, 2025
commit d0818b5c929b9f8500b99d4bbf7f90430550711b
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ public class WebSocketClientHandler {
private final Map<String, SpringWebSocketClient> requestClientMap = new ConcurrentHashMap<>();
private final Function<String, SpringWebSocketClient> requestClientFactory;

@Getter private String relayName;
@Getter private String relayUri;
@Getter private final String relayName;
@Getter private final String relayUri;

/**
* Create a handler for a specific relay.
Expand Down Expand Up @@ -85,6 +85,7 @@ public List<String> sendEvent(@NonNull IEvent event) {
*/
protected List<String> sendRequest(@NonNull Filters filters, @NonNull String subscriptionId) {
try {
@SuppressWarnings("resource")
SpringWebSocketClient client = getOrCreateRequestClient(subscriptionId);
return client.send(new ReqMessage(subscriptionId, filters));
} catch (IOException e) {
Expand All @@ -97,6 +98,7 @@ public AutoCloseable subscribe(
@NonNull String subscriptionId,
@NonNull Consumer<String> listener,
Consumer<Throwable> errorListener) {
@SuppressWarnings("resource")
SpringWebSocketClient client = getOrCreateRequestClient(subscriptionId);
Consumer<Throwable> safeError =
errorListener != null
Expand Down