This is a lightweight way of doing dependency injection and enabling classes to be unit tested in isolation. No class in this library instantiates another class directly, otherwise they would be tightly coupled. Instead, they all call the factory methods in this class when they want to create instances of another class. An instance of Factory is provided on construction to each class which may require it, the initial factory is instantiated in the Pusher constructor, the only constructor which a library consumer should need to call directly. Conventions: - any method that starts with "new", such as {@link #newPublicChannel(String)} creates a new instance of that class everytime it is called. - any method that starts with "get", such as {@link #getEventQueue()} returnsa singleton. These are lazily constructed and their access methods should be synchronized for this reason.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.