Another more simple approach would be to give the ApnsConnection object a name (which would be stored as a private final, non-empty trimmed string). The PushManager would generate the name and pass it in to the ApnsConnection through the constructor.

By doing this you can replace the ConcurrentMap of AtomicInteger in the ApnsConnection class with a simple private `int` in the PushManager class. This removed the mutable global state.

This has the added benefit of making the naming scheme opaque to the ApnsConnection. A connection is told it's name, it doesn't need to know how to construct a name.