Search in sources :

Example 1 with IntSequenceGenerator

use of org.apache.activemq.util.IntSequenceGenerator in project activemq-artemis by apache.

the class MulticastTransportTest method createProducer.

@Override
protected Transport createProducer() throws Exception {
    LOG.info("Producer using URI: " + multicastURI);
    // we are not using the TransportFactory as this assumes that
    // transports talk to a server using a WireFormat Negotiation step
    // rather than talking directly to each other
    OpenWireFormat wireFormat = createWireFormat();
    MulticastTransport transport = new MulticastTransport(wireFormat, new URI(multicastURI));
    transport.setLoopBackMode(false);
    transport.setSequenceGenerator(new IntSequenceGenerator());
    return new CommandJoiner(transport, wireFormat);
}
Also used : OpenWireFormat(org.apache.activemq.openwire.OpenWireFormat) IntSequenceGenerator(org.apache.activemq.util.IntSequenceGenerator) CommandJoiner(org.apache.activemq.transport.CommandJoiner) URI(java.net.URI)

Example 2 with IntSequenceGenerator

use of org.apache.activemq.util.IntSequenceGenerator in project activemq-artemis by apache.

the class MulticastTransportTest method createConsumer.

@Override
protected Transport createConsumer() throws Exception {
    OpenWireFormat wireFormat = createWireFormat();
    MulticastTransport transport = new MulticastTransport(wireFormat, new URI(multicastURI));
    transport.setLoopBackMode(false);
    transport.setSequenceGenerator(new IntSequenceGenerator());
    return new CommandJoiner(transport, wireFormat);
}
Also used : OpenWireFormat(org.apache.activemq.openwire.OpenWireFormat) IntSequenceGenerator(org.apache.activemq.util.IntSequenceGenerator) CommandJoiner(org.apache.activemq.transport.CommandJoiner) URI(java.net.URI)

Example 3 with IntSequenceGenerator

use of org.apache.activemq.util.IntSequenceGenerator in project activemq-artemis by apache.

the class UdpTransportTest method createConsumer.

@Override
protected Transport createConsumer() throws Exception {
    LOG.info("Consumer on port: " + consumerPort);
    OpenWireFormat wireFormat = createWireFormat();
    UdpTransport transport = new UdpTransport(wireFormat, consumerPort);
    transport.setSequenceGenerator(new IntSequenceGenerator());
    return new CommandJoiner(transport, wireFormat);
}
Also used : OpenWireFormat(org.apache.activemq.openwire.OpenWireFormat) IntSequenceGenerator(org.apache.activemq.util.IntSequenceGenerator) CommandJoiner(org.apache.activemq.transport.CommandJoiner)

Example 4 with IntSequenceGenerator

use of org.apache.activemq.util.IntSequenceGenerator in project activemq-artemis by apache.

the class UdpTransportTest method createProducer.

@Override
protected Transport createProducer() throws Exception {
    LOG.info("Producer using URI: " + producerURI);
    // we are not using the TransportFactory as this assumes that
    // UDP transports talk to a server using a WireFormat Negotiation step
    // rather than talking directly to each other
    OpenWireFormat wireFormat = createWireFormat();
    UdpTransport transport = new UdpTransport(wireFormat, new URI(producerURI));
    transport.setSequenceGenerator(new IntSequenceGenerator());
    return new CommandJoiner(transport, wireFormat);
}
Also used : OpenWireFormat(org.apache.activemq.openwire.OpenWireFormat) IntSequenceGenerator(org.apache.activemq.util.IntSequenceGenerator) CommandJoiner(org.apache.activemq.transport.CommandJoiner) URI(java.net.URI)

Aggregations

OpenWireFormat (org.apache.activemq.openwire.OpenWireFormat)4 CommandJoiner (org.apache.activemq.transport.CommandJoiner)4 IntSequenceGenerator (org.apache.activemq.util.IntSequenceGenerator)4 URI (java.net.URI)3