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): restore override annotations and clean up method docum…
…entation

- Added missing override annotations to several methods for clarity.
- Cleaned up method documentation by removing redundant comments.
- Improved code readability and maintainability.
  • Loading branch information
erict875 committed Oct 3, 2025
commit 33543a37619765cf361fdb617790b80217467082
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ public NostrIF setSender(@NonNull Identity sender) {
return this;
}

@Override
/**
* Configure one or more relays by name and URI; creates client handlers lazily.
*/
@Override
public NostrIF setRelays(@NonNull Map<String, String> relays) {
relays
.entrySet()
Expand All @@ -129,10 +129,10 @@ public NostrIF setRelays(@NonNull Map<String, String> relays) {
return this;
}

@Override
/**
* Send an event to all configured relays using the {@link NoteService}.
*/
@Override
public List<String> sendEvent(@NonNull IEvent event) {
if (event instanceof GenericEvent genericEvent) {
if (!verify(genericEvent)) {
Expand All @@ -143,28 +143,28 @@ public List<String> sendEvent(@NonNull IEvent event) {
return noteService.send(event, clientMap);
}

@Override
/**
* Send an event to the provided relays.
*/
@Override
public List<String> sendEvent(@NonNull IEvent event, Map<String, String> relays) {
setRelays(relays);
return sendEvent(event);
}

@Override
/**
* Send a REQ with a single filter to specific relays.
*/
@Override
public List<String> sendRequest(
@NonNull Filters filters, @NonNull String subscriptionId, Map<String, String> relays) {
return sendRequest(List.of(filters), subscriptionId, relays);
}

@Override
/**
* Send REQ with multiple filters to specific relays.
*/
@Override
public List<String> sendRequest(
@NonNull List<Filters> filtersList,
@NonNull String subscriptionId,
Expand All @@ -173,10 +173,10 @@ public List<String> sendRequest(
return sendRequest(filtersList, subscriptionId);
}

@Override
/**
* Send REQ with multiple filters to configured relays; flattens distinct responses.
*/
@Override
public List<String> sendRequest(
@NonNull List<Filters> filtersList, @NonNull String subscriptionId) {
return filtersList.stream()
Expand All @@ -203,10 +203,10 @@ public static List<String> sendRequest(
return client.send(new ReqMessage(subscriptionId, filters));
}

@Override
/**
* Send a REQ with a single filter to configured relays using a per-subscription client.
*/
@Override
public List<String> sendRequest(@NonNull Filters filters, @NonNull String subscriptionId) {
createRequestClient(subscriptionId);

Expand Down Expand Up @@ -290,19 +290,19 @@ public AutoCloseable subscribe(
};
}

@Override
/**
* Sign a signable object with the provided identity.
*/
@Override
public NostrIF sign(@NonNull Identity identity, @NonNull ISignable signable) {
identity.sign(signable);
return this;
}

@Override
/**
* Verify the Schnorr signature of a GenericEvent.
*/
@Override
public boolean verify(@NonNull GenericEvent event) {
if (!event.isSigned()) {
throw new IllegalStateException("The event is not signed");
Expand All @@ -318,10 +318,10 @@ public boolean verify(@NonNull GenericEvent event) {
}
}

@Override
/**
* Return a copy of the current relay mapping (name -> URI).
*/
@Override
public Map<String, String> getRelays() {
return clientMap.values().stream()
.collect(
Expand Down