Implemented API of ServiceThread class