Inter-thread messaging library in Java