It appears that Mulligan is speaking to God, and referring to him as "old chap." He gives thanks for the reply he has received to his mock mass, in the form of a whistle.