Examples of ConnectionKey


Examples of org.activemq.pool.ConnectionKey

  public Connection createConnection() throws JMSException {
    return createConnection(null, null);
  }

  public synchronized Connection createConnection(final String userName, final String password) throws JMSException {
    final ConnectionKey key = new ConnectionKey(userName, password);
    PooledSpringXAConnection connection = (PooledSpringXAConnection) this.cache.get(key);
    if (connection == null) {
      final XAConnection delegate = createConnection(key);
      connection = new PooledSpringXAConnection(this, getTransactionManager(), delegate);
      this.cache.put(key, connection);
View Full Code Here

Examples of org.apache.aries.transaction.jms.internal.ConnectionKey

        if (stopped.get()) {
            LOG.debug("PooledConnectionFactory is stopped, skip create new connection.");
            return null;
        }

        ConnectionKey key = new ConnectionKey(userName, password);
        LinkedList<ConnectionPool> pools = cache.get(key);

        if (pools == null) {
            pools = new LinkedList<ConnectionPool>();
            cache.put(key, pools);
View Full Code Here

Examples of org.springframework.social.connect.ConnectionKey

    }

    private Connection<?> getConnection(String providerId, String providerUserId) {
        List<SocialAuthentication> socialAuthentications = userDao.getSocialAuthentications(providerId, providerUserId);
        if (socialAuthentications.isEmpty()) {
            throw new NoSuchConnectionException(new ConnectionKey(providerId, providerUserId));
        }
        return authToConnection(socialAuthentications.get(0));
    }
View Full Code Here

Examples of org.springframework.social.connect.ConnectionKey

   */
  @RequestMapping(value="/{providerId}/{providerUserId}", method=RequestMethod.DELETE)
  public RedirectView removeConnection(@PathVariable String providerId, @PathVariable String providerUserId, NativeWebRequest request) {
    ConnectionFactory<?> connectionFactory = connectionFactoryLocator.getConnectionFactory(providerId);
    preDisconnect(connectionFactory, request);
    connectionRepository.removeConnection(new ConnectionKey(providerId, providerUserId));
    postDisconnect(connectionFactory, request);
    return connectionStatusRedirect(providerId, request);
  }
View Full Code Here

Examples of org.springframework.social.connect.ConnectionKey

  public static DummyConnection<Object> dummy(String provider, String user) {
    return new DummyConnection<Object>(provider, user, new Object());
  }
 
  public DummyConnection(String provider, String user, T api) {
    _key = new ConnectionKey(provider, user);
    _api = api;
  }
View Full Code Here

Examples of org.springframework.social.connect.ConnectionKey

  public static DummyConnection<Object> dummy(String provider, String user) {
    return new DummyConnection<Object>(provider, user, new Object());
  }
 
  public DummyConnection(String provider, String user, T api) {
    _key = new ConnectionKey(provider, user);
    _api = api;
  }
View Full Code Here

Examples of org.springframework.social.connect.ConnectionKey

            UserProfile socialMediaProfile = connection.fetchUserProfile();
            dto.setEmail(socialMediaProfile.getEmail());
            dto.setFirstName(socialMediaProfile.getFirstName());
            dto.setLastName(socialMediaProfile.getLastName());

            ConnectionKey providerKey = connection.getKey();
            dto.setSignInProvider(SocialMediaService.valueOf(providerKey.getProviderId().toUpperCase()));
        }

        return dto;
    }
View Full Code Here

Examples of org.springframework.social.connect.ConnectionKey

  public void setTablePrefix(String tablePrefix) {
    this.tablePrefix = tablePrefix;
  }
 
  public List<String> findUserIdsWithConnection(Connection<?> connection) {
    ConnectionKey key = connection.getKey();
    List<String> localUserIds = jdbcTemplate.queryForList("select userId from " + tablePrefix + "UserConnection where providerId = ? and providerUserId = ?", String.class, key.getProviderId(), key.getProviderUserId());   
    if (localUserIds.size() == 0 && connectionSignUp != null) {
      String newUserId = connectionSignUp.execute(connection);
      if (newUserId != null)
      {
        createConnectionRepository(newUserId).addConnection(connection);
View Full Code Here

Examples of org.springframework.social.connect.ConnectionKey

  }

  @SuppressWarnings("unchecked")
  public <A> Connection<A> getConnection(Class<A> apiType, String providerUserId) {
    String providerId = getProviderId(apiType);
    return (Connection<A>) getConnection(new ConnectionKey(providerId, providerUserId));
  }
View Full Code Here

Examples of org.springframework.social.connect.ConnectionKey

    throw new NoSuchConnectionException(connectionKey);
  }

  @SuppressWarnings("unchecked")
  public <A> Connection<A> getConnection(Class<A> apiType, String providerUserId) {
    return (Connection<A>) getConnection(new ConnectionKey(getProviderId(apiType), providerUserId));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
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.