relayrides/pushy — pull request #95 by jchambers (2014-06-06 21:55:56+00:00)
Title: Configuration objects

This introduces the `PushManagerConfiguration` and `ApnsConnectionConfiguration` objects and does away with the `PushManagerFactory` class. `PushManager` instances are now created directly via a public constructor.

This comes in anticipation of having many more configuration options in the near future. In the immediate future, this supports #72 by providing a home for configurable timeout intervals. Later, this will allow callers to configure the connection cycling options [under discussion on the mailing list](https://groups.google.com/d/msg/pushy-apns/HTftu8vH0A0/6jn-xXVFqlUJ).

The problem with the factory pattern was that factories weren't really reusable (they'd be used to construct a single `PushManager`, then discarded) and the pattern demanded an ever-expanding constructor signature to accommodate new options. This approach should be more practical.

----
TODO:

- [ ] Add unit tests for configuration object copy constructors
- [ ] Add unit tests for `null` checks in `ApnsConnection`/`PushManager` constructors