Search in sources :

Example 1 with UrlVendorImplementation

use of com.adaptris.core.jms.UrlVendorImplementation in project interlok by adaptris.

the class AdvancedActiveMqConsumerTest method retrieveObjectForSampleConfig.

@Override
protected Object retrieveObjectForSampleConfig() {
    JmsConnection connection = new JmsConnection();
    PtpConsumer producer = new PtpConsumer();
    producer.setQueue("destination");
    UrlVendorImplementation vendorImpl = createImpl();
    vendorImpl.setBrokerUrl(BasicActiveMqImplementationTest.PRIMARY);
    connection.setUserName("BrokerUsername");
    connection.setPassword("BrokerPassword");
    connection.setVendorImplementation(vendorImpl);
    StandaloneConsumer result = new StandaloneConsumer();
    result.setConnection(connection);
    result.setConsumer(producer);
    return result;
}
Also used : PtpConsumer(com.adaptris.core.jms.PtpConsumer) UrlVendorImplementation(com.adaptris.core.jms.UrlVendorImplementation) JmsConnection(com.adaptris.core.jms.JmsConnection) StandaloneConsumer(com.adaptris.core.StandaloneConsumer)

Example 2 with UrlVendorImplementation

use of com.adaptris.core.jms.UrlVendorImplementation in project interlok by adaptris.

the class AdvancedActiveMqProducerTest method retrieveObjectForSampleConfig.

@Override
protected Object retrieveObjectForSampleConfig() {
    JmsConnection connection = new JmsConnection();
    PtpProducer producer = new PtpProducer();
    producer.setQueue("destination");
    UrlVendorImplementation vendorImpl = createImpl();
    vendorImpl.setBrokerUrl(BasicActiveMqImplementationTest.PRIMARY);
    connection.setUserName("BrokerUsername");
    connection.setPassword("BrokerPassword");
    connection.setVendorImplementation(vendorImpl);
    StandaloneProducer result = new StandaloneProducer();
    result.setConnection(connection);
    result.setProducer(producer);
    return result;
}
Also used : UrlVendorImplementation(com.adaptris.core.jms.UrlVendorImplementation) JmsConnection(com.adaptris.core.jms.JmsConnection) PtpProducer(com.adaptris.core.jms.PtpProducer) StandaloneProducer(com.adaptris.core.StandaloneProducer)

Example 3 with UrlVendorImplementation

use of com.adaptris.core.jms.UrlVendorImplementation in project interlok by adaptris.

the class BasicActiveMqProducerTest method retrieveObjectForSampleConfig.

@Override
protected Object retrieveObjectForSampleConfig() {
    JmsConnection connection = new JmsConnection();
    PtpProducer producer = new PtpProducer();
    producer.setQueue("queueName");
    UrlVendorImplementation vendorImpl = createImpl();
    vendorImpl.setBrokerUrl(BasicActiveMqImplementationTest.PRIMARY);
    connection.setUserName("BrokerUsername");
    connection.setPassword("BrokerPassword");
    connection.setVendorImplementation(vendorImpl);
    StandaloneProducer result = new StandaloneProducer();
    result.setConnection(connection);
    result.setProducer(producer);
    return result;
}
Also used : UrlVendorImplementation(com.adaptris.core.jms.UrlVendorImplementation) JmsConnection(com.adaptris.core.jms.JmsConnection) PtpProducer(com.adaptris.core.jms.PtpProducer) StandaloneProducer(com.adaptris.core.StandaloneProducer)

Example 4 with UrlVendorImplementation

use of com.adaptris.core.jms.UrlVendorImplementation in project interlok by adaptris.

the class BasicActiveMqConsumerTest method retrieveObjectForSampleConfig.

@Override
protected Object retrieveObjectForSampleConfig() {
    JmsConnection connection = new JmsConnection();
    PtpConsumer producer = new PtpConsumer();
    producer.setQueue("destination");
    UrlVendorImplementation vendorImpl = createImpl();
    vendorImpl.setBrokerUrl(BasicActiveMqImplementationTest.PRIMARY);
    connection.setUserName("BrokerUsername");
    connection.setPassword("BrokerPassword");
    connection.setVendorImplementation(vendorImpl);
    StandaloneConsumer result = new StandaloneConsumer();
    result.setConnection(connection);
    result.setConsumer(producer);
    return result;
}
Also used : PtpConsumer(com.adaptris.core.jms.PtpConsumer) UrlVendorImplementation(com.adaptris.core.jms.UrlVendorImplementation) JmsConnection(com.adaptris.core.jms.JmsConnection) StandaloneConsumer(com.adaptris.core.StandaloneConsumer)

Example 5 with UrlVendorImplementation

use of com.adaptris.core.jms.UrlVendorImplementation in project interlok by adaptris.

the class ChannelTest method createMockJmsConnection.

private MockJmsConnection createMockJmsConnection(String uid, String brokerUrl) {
    MockJmsConnection connection = new MockJmsConnection();
    if (uid != null)
        connection.setUniqueId(uid);
    UrlVendorImplementation vendorImp = new UrlVendorImplementation() {

        @Override
        public ConnectionFactory createConnectionFactory() throws JMSException {
            return null;
        }
    };
    vendorImp.setBrokerUrl(brokerUrl);
    connection.setVendorImplementation(vendorImp);
    connection.setConnectionErrorHandler(new MockNoOpConnectionErrorHandler());
    return connection;
}
Also used : UrlVendorImplementation(com.adaptris.core.jms.UrlVendorImplementation) MockNoOpConnectionErrorHandler(com.adaptris.core.jms.MockNoOpConnectionErrorHandler) MockJmsConnection(com.adaptris.interlok.junit.scaffolding.jms.MockJmsConnection)

Aggregations

UrlVendorImplementation (com.adaptris.core.jms.UrlVendorImplementation)5 JmsConnection (com.adaptris.core.jms.JmsConnection)4 StandaloneConsumer (com.adaptris.core.StandaloneConsumer)2 StandaloneProducer (com.adaptris.core.StandaloneProducer)2 PtpConsumer (com.adaptris.core.jms.PtpConsumer)2 PtpProducer (com.adaptris.core.jms.PtpProducer)2 MockNoOpConnectionErrorHandler (com.adaptris.core.jms.MockNoOpConnectionErrorHandler)1 MockJmsConnection (com.adaptris.interlok.junit.scaffolding.jms.MockJmsConnection)1