Will call setOnConnect if function passed as onConnect changes
* id is used in an example * isValidConnection has to take the connection argument to validate