Examples of ConnectionParams


Examples of com.rabbitmq.client.impl.ConnectionParams

     */
    public Connection newConnection(ExecutorService executor, Address[] addrs)
        throws IOException
    {
        FrameHandlerFactory fhFactory = createFrameHandlerFactory();
        ConnectionParams params = params(executor);

        if (isAutomaticRecoveryEnabled()) {
            // see com.rabbitmq.client.impl.recovery.RecoveryAwareAMQConnectionFactory#newConnection
            AutorecoveringConnection conn = new AutorecoveringConnection(params, fhFactory, addrs);
            conn.init();
View Full Code Here

Examples of com.rabbitmq.client.impl.ConnectionParams

            throw (lastException != null) ? lastException : new IOException("failed to connect");
        }
    }

    public ConnectionParams params(ExecutorService executor) {
        return new ConnectionParams(username, password, executor, virtualHost, getClientProperties(),
                                    requestedFrameMax, requestedChannelMax, requestedHeartbeat, shutdownTimeout, saslConfig,
                                    networkRecoveryInterval, topologyRecovery, exceptionHandler, threadFactory);
    }
View Full Code Here

Examples of com.rabbitmq.client.impl.ConnectionParams

    public void testConnectionSendsSingleHeaderAndTimesOut() {
        IOException exception = new SocketTimeoutException();
        _mockFrameHandler.setExceptionOnReadingFrames(exception);
        assertEquals(0, _mockFrameHandler.countHeadersSent());
        try {
            ConnectionParams params = factory.params(Executors.newFixedThreadPool(1));
            new AMQConnection(params, _mockFrameHandler).start();
            fail("Connection should have thrown exception");
        } catch(IOException signal) {
           // As expected
        }
View Full Code Here

Examples of com.rabbitmq.client.impl.ConnectionParams

     */
    public void testConnectionHangInNegotiation() {
        this._mockFrameHandler.setTimeoutCount(10); // to limit hang
        assertEquals(0, this._mockFrameHandler.countHeadersSent());
        try {
            ConnectionParams params = factory.params(Executors.newFixedThreadPool(1));
            new AMQConnection(params, this._mockFrameHandler).start();
            fail("Connection should have thrown exception");
        } catch(IOException signal) {
           // As expected
        }
View Full Code Here

Examples of org.jitterbit.integration.database.driver.ConnectionParams

    }

    @Override
    protected void runImpl() throws InterruptedException {
        setMessage("Asking the server for column information");
        ConnectionParams connectionParams = dbLocation.getConnectionParams();
        DatabaseInfoProvider provider = DatabaseInfoProviderFactory.createProvider(connectionParams);
        provider.getTableInfo(connectionParams, sourceId, targetId, emptyObjects, callback);
    }
View Full Code Here

Examples of org.jitterbit.integration.database.driver.ConnectionParams

    private void submitJob() {
        String sql = sqlSupplier.get();
        if (StringUtils.isEmpty(sql)) {
            Alert.error("Please enter a SQL statement to test.", "No SQL Statement");
        } else {
            ConnectionParams params = dbLocation.getConnectionParams();
            GetManualSqlStatementDetailsJob job = new GetManualSqlStatementDetailsJob(sql, params, sourceId);
            job.setReceiver(new Callback());
            job.submit(waitService, 0);
        }
    }
View Full Code Here

Examples of org.jitterbit.integration.database.driver.ConnectionParams

    private ManualSqlStatement downloadStatementDetails() {
        String sql = getSqlStatement();
        if (sql.isEmpty()) {
            return null;
        }
        ConnectionParams params = dbLocation.getConnectionParams();
        GetManualSqlStatementDetailsJob job = new GetManualSqlStatementDetailsJob(sql, params, sourceId);
        job.submit(getWaitService(), 0);
        return job.getDetails();
    }
View Full Code Here

Examples of org.jitterbit.integration.database.driver.ConnectionParams

    }

    private String getConnectionStringFromDriver() {
        DriverDescriptor driver = getDriver();
        if (driver != null) {
            ConnectionParams params = getConnectionParams();
            StringBuilder sb = new StringBuilder(driver.getConnectionString(params));
            appendOptionalParameters(sb);
            return sb.toString();
        }
        return null;
View Full Code Here

Examples of org.jitterbit.integration.database.driver.ConnectionParams

    /**
     * Creates a <code>ConnectionParams</code> object from this <code>DatabaseLocation</code>.
     */
    public ConnectionParams getConnectionParams() {
        synchronized (getDataLock()) {
            ConnectionParams params = new ConnectionParams();
            params.setServer(getServer())
                  .setPort(getPort())
                  .setDatabase(getDatabase())
                  .setDriverName(getDriverName())
                  .setDriver(getDriver())
                  .setUser(getLogin())
                  .setPassword(getPassword())
                  .setAdditionalParams(getAdditionalConnectionParameters())
                  .setBeginEndQuotes(getBeginEndQuote())
                  .setTransactionIsolationLevel(getTransactionIsolationLevel());
            if (isManualMode()) {
                params.setManualConnectionString(getManualConnectionString());
            }
            return params;
        }
    }
View Full Code Here

Examples of org.jitterbit.integration.database.driver.ConnectionParams

        loc.setServer(server);
        loc.setDatabase(db);
        loc.setLogin(user);
        loc.setPassword(password);
        loc.setPort(port);
        ConnectionParams params = loc.getConnectionParams();
        assertEquals(server, params.getServer());
        assertEquals(db, params.getDatabase());
        assertEquals(user, params.getUser());
        assertEquals(password, params.getPassword());
        assertEquals(port, params.getPort());
    }
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.