src/main/java/org/jivesoftware/smack/keepalive/KeepAliveManager.java
public synchronized static KeepAliveManager getInstanceFor(
            Connection connection) {
        KeepAliveManager pingManager = instances.get(connection);

        if (pingManager == null) {
            pingManager = new KeepAliveManager(connection);
            instances.put(connection, pingManager);
        }
        return pingManager;
    }
public synchronized static KeepAliveManager getInstanceFor(
            Connection connection) {
        KeepAliveManager pingManager = instances.get(connection);

        if (pingManager == null) {
            pingManager = new KeepAliveManager(connection);
            instances.put(connection, pingManager);
        }
        return pingManager;
    }
public synchronized static KeepAliveManager getInstanceFor ( Connection connection ) { KeepAliveManager pingManager = instances . get ( connection ) ; if ( pingManager == null ) { pingManager = new KeepAliveManager ( connection ) ; instances . put ( connection , pingManager ) ; } return pingManager ; }
Retrieves a {@link KeepAliveManager} for the specified {@link Connection}
, creating one if it doesn't already exist.

@param connection
The connection the manager is attached to.
@return The new or existing manager.
Retrieves a { @link KeepAliveManager } for the specified { @link Connection } creating one if it doesn t already exist .