The JPLC is a Java library that interfaces with the USB INSTEON PowerLinc Controller (PLC). It uses the javax.usb Linux reference implementation to connect to the USB system. There is a windows port of javax.usb that should work without any Java code changes, but this is untested.
The JPLC was designed with concurrency in mind. It is a multi-threaded library that will not block client calls to the interface. The USB implementation has an outpipe and inpipe which can send and receive data at the same time. Without a concurrent approach, communicating with the PLC would have been an exercise in dealing with 'missed' messages. I've tried to apply many of the concurrent programming principals that are outlined in Java Concurrency in Practice. Without that excellent text as a guide, I would have quickly become lost.
The JPLC uses Guice for dependency injection. There are many great DI frameworks, but Guice was chosen because of its very small footprint. This keeps the overall size of the JPLC to a minimum.
The JPLC was written using Test Driven Development. JUnit is the testing framework and Mockito is used extensively. The tests make refactoring painless. As of the 0.3.0 release, the test coverage of the project is nearly 95%. At this point in my programming career, I don't think I could have done it any other way.
I hope you will find this project useful.