Get the manger instance responsible for the given connection.

@param connection the XMPP connection.
@return a manager instance.
332012
public static synchronized IoTDataManager getInstanceFor(XMPPConnection connection) {
        IoTDataManager manager = INSTANCES.get(connection);
        if (manager == null) {
            manager = new IoTDataManager(connection);
            INSTANCES.put(connection, manager);
        }
        return manager;
    }
1238023
Set<ConnectionManager> getConnectionManagers()
   {
      if (cmToCl == null)
         return Collections.unmodifiableSet(Collections.emptySet());

      return Collections.unmodifiableSet(cmToCl.keySet());
   }
548401
private HttpClientConnectionManager createHttpClientConnectionManager() {
        ConnectionSocketFactory socketFactory = PlainConnectionSocketFactory.getSocketFactory();
        LayeredConnectionSocketFactory sslSocketFactory;
        try {
            sslSocketFactory = new SSLConnectionSocketFactory(SSLContext.getDefault(),
                    SSLConnectionSocketFactory.STRICT_HOSTNAME_VERIFIER);
        } catch (NoSuchAlgorithmException e) {
            throw new BceClientException("Fail to create SSLConnectionSocketFactory", e);
        }
        Registry<ConnectionSocketFactory> registry =
                RegistryBuilder.<ConnectionSocketFactory>create().register(Protocol.HTTP.toString(), socketFactory)
                        .register(Protocol.HTTPS.toString(), sslSocketFactory).build();
        PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager(registry);
        connectionManager.setDefaultMaxPerRoute(this.config.getMaxConnections());
        connectionManager
                .setDefaultSocketConfig(SocketConfig.custom().setSoTimeout(this.config.getSocketTimeoutInMillis())
                        .setTcpNoDelay(true).build());
        connectionManager.setMaxTotal(this.config.getMaxConnections());
        return connectionManager;
    }
765266
protected Cassandra.Client getConnection(Object connection)
    {
        if (connection != null)
        {
            return ((IPooledConnection) connection).getAPI();
        }

        throw new KunderaException("Invalid configuration!, no available pooled connection found for:"
                + this.getClass().getSimpleName());
    }
986185
protected function createManager($connection)
    {
        if (!isset($this->_managers[$connection])) {
            $this->_managers[$connection] = new MigrationLog($connection);
        }
        return $this->_managers[$connection];
    }
749465
public static final MQLinkManager getInstance()
   {
      if(TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "getInstance");

      if (mqLinkManager == null)
      {
         try
         {
            Class cls = Class.forName(CommsConstants.JS_COMMS_MQ_LINK_MANAGER_CLASS);
            mqLinkManager = (MQLinkManager) cls.newInstance();

         }
         catch (Exception e)
         {
            FFDCFilter.processException(e, CLASS_NAME + ".getInstance", 
                                        "1");
            if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled())
            {
               SibTr.exception(tc, e);
            }
            throw new RuntimeException(e);
         }
      }

      if(TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "getInstance", mqLinkManager);
      return mqLinkManager;
   }
881808
public static ProtocolConnectionManager create(final Connection connection, final ConnectionOpenHandler openHandler) {
        return create(new EstablishedConnection(connection, openHandler));
    }
114065
public static synchronized AdHocCommandManager getAddHocCommandsManager(XMPPConnection connection) {
        AdHocCommandManager ahcm = instances.get(connection);
        if (ahcm == null) {
            ahcm = new AdHocCommandManager(connection);
            instances.put(connection, ahcm);
        }
        return ahcm;
    }
394477
private Connection getConnection(AlpineQueryManager aqm) {
        final JDOConnection jdoConnection = aqm.getPersistenceManager().getDataStoreConnection();
        if (jdoConnection != null) {
            if (jdoConnection.getNativeConnection() instanceof Connection) {
                return (Connection)jdoConnection.getNativeConnection();
            }
        }
        return null;
    }
1210489
public static synchronized ChatManager getInstanceFor(XMPPConnection connection) {
        ChatManager manager = INSTANCES.get(connection);
        if (manager == null)
            manager = new ChatManager(connection);
        return manager;
    }
5224
public MPConnection getMPConnection(MEConnection conn)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getMPConnection", new Object[] { conn });

    MPConnection mpConn;
    synchronized(_mpConnectionsByMEConnection)
    {
      //look up the MPConnection based on the MEConnection
      mpConn = _mpConnectionsByMEConnection.get(conn);      
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getMPConnection", mpConn);
  
    return mpConn;
  }
804705
public static synchronized CarbonManager getInstanceFor(XMPPConnection connection) {
        CarbonManager carbonManager = INSTANCES.get(connection);

        if (carbonManager == null) {
            carbonManager = new CarbonManager(connection);
            INSTANCES.put(connection, carbonManager);
        }

        return carbonManager;
    }
801753
public com.google.api.ads.adwords.axis.v201809.mcm.ManagedCustomer getManager() {
        return manager;
    }
102610
public function getConnectionRoles($connection = null, $server = null)
    {
        $credentials = $this->credentials->getServerCredentials($connection, $server);

        return Arr::get($credentials, 'roles', []);
    }
454971
public ClientBuilderForConnector forConnector(DockerConnector connector)
            throws UnrecoverableKeyException, NoSuchAlgorithmException, KeyStoreException, KeyManagementException {
        LOG.debug("Building connection to docker host '{}'", connector.getServerUrl());
        withCredentialsId(connector.getCredentialsId());
        withConnectorType(connector.getConnectorType());
        withConnectTimeout(connector.getConnectTimeout());
        withReadTimeout(connector.getReadTimeout());

        return forServer(connector.getServerUrl(), connector.getApiVersion());
    }
556919
public static boolean isServiceEnabled(XMPPConnection connection) {
        connection.getXMPPServiceDomain();
        return ServiceDiscoveryManager.getInstanceFor(connection).includesFeature(AMPExtension.NAMESPACE);
    }
783330
@Override
	public String execute(Connection<?> connection) {
		String localUserId = UUID.randomUUID().toString();
		logger.debug("Local User ID is: {}", localUserId);
		return localUserId;
	}