Java and SNA: A case study
By Matt MacKinnon, Adam King, David Kaminsky2003-05-24
The Java/CPI-C API
While designing our API, our primary goal was to mimic the C version of the CPI-C API and thus leverage C programmers' learning investment. To a great extent, we've accomplished this goal. To current CPI-C programmers, the calls to the CPI-C library will look extremely familiar.
Preserving the look of the actual calls requires some additional work by the programmer, such as creating objects to hold some of the output parameters. This is necessary to resolve an unavoidable conflict: Java uses pass-by-value function calls; CPI-C uses pass-by-reference [4] . Since Java is an object-oriented language, we feel that it is natural to create objects to hold CPI-C parameters, although we do acknowledge that it creates a small amount of extra work for the programmer.
Tutorial Pages:
» Java and SNA: A case study
» The Java/CPI-C API
» Classic Transaction #1: The Pipe
» Classic Transaction #5: The Database Update
» Native Calls
» Diversion: Native Calls and Applets
» Performance
» CPIC Calls That Have Been Implemented
» Conclusions
» Footnotes
First published by IBM DeveloperWorks
