Conversation
✅ Deploy Preview for fdc3 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
|
||
| ```java | ||
| // Event types are defined as FDC3Event.Type enum | ||
| public enum Type { |
There was a problem hiding this comment.
Should there be also a CONTEXT_CLEARED type?
There was a problem hiding this comment.
Yes as that changed is already merged and will go out in the same or a prior version of FDC3
|
|
||
| ```java | ||
| public class DisplayMetadata { | ||
| /** A user-readable name for this channel, e.g: "Red". */ |
There was a problem hiding this comment.
This is a nitpick, but in other places it is the lowercase "red" like in DesktopAgent.md line 1820:
Channel redChannel = userChannels.stream().filter(c -> "red".equals(c.getId())).findFirst().orElse(null);, maybe worth lowercasing for consistency here
| ```java | ||
| desktopAgent.addIntentListener("QuoteStream", (context, metadata) -> { | ||
| PrivateChannel channel = desktopAgent.createPrivateChannel().toCompletableFuture().get(); | ||
| String symbol = context.getId().get("ticker"); |
There was a problem hiding this comment.
Just wondering, should we protect this from a NullPointer? if getId() can return null, then get("ticker") will fail
This pull request adds comprehensive Java code samples and API reference sections to the FDC3 documentation for Channels, Errors, and Events. The changes ensure that Java developers have clear, idiomatic examples and type definitions for all major FDC3 concepts, aligning the documentation with existing TypeScript, C#, and Go examples.
Java API Reference Additions:
Channel API Java Examples and Types:
Channel, including methods and theTypeenum, plus Java code samples for methods likebroadcast,getCurrentContext, andaddContextListener. Deprecated methods are clearly marked, and unimplemented features are noted. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18]Error Types in Java:
AgentError,ChannelError,OpenError,ResolveError, andResultError, with idiomatic Java constructors and toString methods. Noted unimplemented errors. [1] [2] [3] [4] [5] [6]Event Types and Handling in Java:
FDC3Event,EventHandler, and enums for event types. Provided code samples for handling standard and private channel events, and for extracting event details. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]These updates significantly improve the usability of the FDC3 documentation for Java developers by providing clear, idiomatic, and complete API references and usage examples.
Review Checklist
DesktopAgent,Channel,PrivateChannel,Listener,Bridging)? No.JSDoc comments on interfaces and types should be matched to the main documentation in /docs