An implementation for synchronous channels in Java