Making getHostName method public in TaskContext