Skip to content

Commit

Permalink
javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
greg committed Jul 24, 2024
1 parent 243c459 commit fc1ee1b
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@

import java.util.concurrent.atomic.AtomicLong;

/**
* Imports a TimeService into the event processor, any node method annotated with {@code @ServiceRegistered} will receive
* the service if the types match.
*
* running the example:
*
* <pre>
*
* started at 100
* stopped at 500 elapsed:400
* </pre>
*/
public class ImportService {

public static void main(String[] args) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,30 @@

import java.util.concurrent.atomic.AtomicReference;


/**
* Registers a callback listener method with an externally imported service.
*
* <ul>
* <li>Register a MarketDataPublisher service with the event processor that registers MarketDataSubscriber</li>
* <li>Create a MarketDataSubscriberNode that implements and exports the listener call back interface, MarketDataSubscriber</li>
* <li>Annotate a node method with {@code @ServiceRegistered} to access the external MarketDataPublisher service</li>
* <li>Register the subscription callback with the MarketDataPublisher using the EventProcessor.exportedService</li>
* </ul>
*
* The event processor implements the exported listener interface, MarketDataSubscriber, and receives the market
* data update callbacks. The processor dispatches and market updates to the MarketDataSubscriberNode or any other node
* that exports the MarketDataSubscriber interface.
*
*
* <pre>
*
* running the example:
*
* marketUpdate: AAA 23.24
* marketUpdate: AAA 19.99
* marketUpdate: AAA 15.67
* </pre>
*/
public class ServiceCallback {

public static void main(String[] args) {
Expand Down

0 comments on commit fc1ee1b

Please sign in to comment.