structuring web-service API started, some auto-detection logic introduced - struggling with RXTX closing problem