use of org.apache.activemq.openwire.OpenWireFormat 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);
}
use of org.apache.activemq.openwire.OpenWireFormat in project activemq-artemis by apache.
the class RecoverExpiredMessagesTest method initCombosForTestRecovery.
public void initCombosForTestRecovery() throws Exception {
addCombinationValues("queuePendingPolicy", new PendingQueueMessageStoragePolicy[] { new FilePendingQueueMessageStoragePolicy(), new VMPendingQueueMessageStoragePolicy() });
PersistenceAdapter[] persistenceAdapters = new PersistenceAdapter[] { new KahaDBPersistenceAdapter(), new JDBCPersistenceAdapter(DataSourceServiceSupport.createDataSource(IOHelper.getDefaultDataDirectory()), new OpenWireFormat()) };
for (PersistenceAdapter adapter : persistenceAdapters) {
adapter.setDirectory(new File(IOHelper.getDefaultDataDirectory()));
}
addCombinationValues("persistenceAdapter", persistenceAdapters);
}
use of org.apache.activemq.openwire.OpenWireFormat 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);
}
use of org.apache.activemq.openwire.OpenWireFormat in project activemq-artemis by apache.
the class MarshallingBrokerTest method initCombos.
public void initCombos() {
OpenWireFormat wf1 = new OpenWireFormat();
wf1.setCacheEnabled(false);
OpenWireFormat wf2 = new OpenWireFormat();
wf2.setCacheEnabled(true);
addCombinationValues("wireFormat", new Object[] { wf1, wf2 });
}
use of org.apache.activemq.openwire.OpenWireFormat in project activemq-artemis by apache.
the class OpenWireProtocolManager method createConnectionEntry.
@Override
public ConnectionEntry createConnectionEntry(Acceptor acceptorUsed, Connection connection) {
OpenWireFormat wf = (OpenWireFormat) wireFactory.createWireFormat();
OpenWireConnection owConn = new OpenWireConnection(connection, server, server.getExecutorFactory().getExecutor(), this, wf);
owConn.sendHandshake();
// first we setup ttl to -1
// then when negotiation, we handle real ttl and delay
ConnectionEntry entry = new ConnectionEntry(owConn, null, System.currentTimeMillis(), -1);
owConn.setConnectionEntry(entry);
return entry;
}
Aggregations