This commit contains no functional changes; simply refactors the
AbstractPubSubClient to stop leaking out member variables to its
subclasses. The way it was previously defined, there were several
member variables that were required to be initialized by the child
classes, which, if you did not initialize them would result in
a runtime error instead of a compile-time error. This commit
changes the variables to be private, provides protected accessor
functions as needed, and creates a constructor function that requires
them to be passed in at initialization time. This moves any related
bugs from run time to compile time and makes it simpler to reason
about the ownership of the variables.
This commit contains no functional changes; simply refactors the AbstractPubSubClient to stop leaking out member variables to its subclasses. The way it was previously defined, there were several member variables that were required to be initialized by the child classes, which, if you did not initialize them would result in a runtime error instead of a compile-time error. This commit changes the variables to be private, provides protected accessor functions as needed, and creates a constructor function that requires them to be passed in at initialization time. This moves any related bugs from run time to compile time and makes it simpler to reason about the ownership of the variables.