Search in sources :

Example 1 with CommandJoiner

use of org.apache.activemq.transport.CommandJoiner 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 CommandJoiner

use of org.apache.activemq.transport.CommandJoiner 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 CommandJoiner

use of org.apache.activemq.transport.CommandJoiner in project activemq-artemis by apache.

the class UnreliableUdpTransportTest method createProducer.

@Override
protected Transport createProducer() throws Exception {
    LOG.info("Producer using URI: " + producerURI);
    OpenWireFormat wireFormat = createWireFormat();
    UnreliableUdpTransport transport = new UnreliableUdpTransport(wireFormat, new URI(producerURI));
    transport.setDropCommandStrategy(dropStrategy);
    ReliableTransport reliableTransport = new ReliableTransport(transport, transport);
    Replayer replayer = reliableTransport.getReplayer();
    reliableTransport.setReplayStrategy(createReplayStrategy(replayer));
    return new CommandJoiner(reliableTransport, wireFormat);
}
Also used : OpenWireFormat(org.apache.activemq.openwire.OpenWireFormat) CommandJoiner(org.apache.activemq.transport.CommandJoiner) URI(java.net.URI)

Example 4 with CommandJoiner

use of org.apache.activemq.transport.CommandJoiner 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 5 with CommandJoiner

use of org.apache.activemq.transport.CommandJoiner 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)6 CommandJoiner (org.apache.activemq.transport.CommandJoiner)6 URI (java.net.URI)4 IntSequenceGenerator (org.apache.activemq.util.IntSequenceGenerator)4 ResponseRedirectInterceptor (org.apache.activemq.transport.udp.ResponseRedirectInterceptor)1 UdpTransport (org.apache.activemq.transport.udp.UdpTransport)1