Smart-grid management using Java-based Complex Event Processing