120 likes | 137 Views
ACS Training. Notification Channel - Java API. Getting Started. At the console open up: ACS/LGPL/CommonSoftware/acscourse/ws/src/alma/ACSCOURSE_MOUNT/MountSupplier.java ACS/LGPL/CommonSoftware/acscourse/ws/src/alma/ACSCOURSE_MOUNT/MountConsumer.java. What files needs to be created?.
E N D
ACS Training Notification Channel - Java API
Getting Started At the console open up: ACS/LGPL/CommonSoftware/acscourse/ws/src/alma/ACSCOURSE_MOUNT/MountSupplier.java ACS/LGPL/CommonSoftware/acscourse/ws/src/alma/ACSCOURSE_MOUNT/MountConsumer.java ACS Training
What files needs to be created? • An IDL file containing the definition of a struct the NC will send/receive. • An instance of the supplier or consumer objects (or a derived class…) ACS Training
What is Gained By Using Java • A complete implementation of the ACS API. • An extremely powerful Supplier class when compared to C++. • It’s harder to write buggy code (i.e., segfaults relating to the C++ API occur often). • Simulations outside of CORBA using the Publisher/Receiver classes. Please see the notification channel document for specific details. ACS Training
Supplier Example Please see: acscourse/ws/src/alma/ACSCOURSE_MOUNT/MountSupplier.java ACS Training
Consumer Example Please see: acscourse/ws/src/alma/ACSCOURSE_MOUNT/MountConsumer.java Also, please open: jcontexmpl/src/alma/demo/EventConsumerImpl/EventConsumerImpl ACS Training
Makefile Targets There is nothing special that has to be used for the Java NC API. Simply compile the Java files using the “normal” Java targets. ACS Training
What Methods are Available in the Consumer and Supplier Classes? Exactly the same methods discussed in the Python Notification Channel presentation. For specific details, take a look at automatically generated documentation available at: www.eso.org/~almamgr/AlmaAcs/OnlineDocs/ACS_docs/java/namespacealma_1_1acs_1_1nc.html ACS Training
Questions about the Java NC API??? ACS Training
Demo ACS Training
Advanced Concepts:Adding Suppliers/Consumers to your Component ACS Training