use of org.apache.activemq.transport.Transport in project activemq-artemis by apache.
the class UdpTestSupport method setUp.
@Override
protected void setUp() throws Exception {
server = createServer();
if (server != null) {
server.setAcceptListener(new TransportAcceptListener() {
@Override
public void onAccept(Transport transport) {
consumer = transport;
consumer.setTransportListener(UdpTestSupport.this);
try {
consumer.start();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
@Override
public void onAcceptError(Exception error) {
}
});
server.start();
}
consumer = createConsumer();
if (consumer != null) {
consumer.setTransportListener(this);
consumer.start();
}
producer = createProducer();
producer.setTransportListener(new TransportListener() {
@Override
public void onCommand(Object command) {
LOG.info("Producer received: " + command);
}
@Override
public void onException(IOException error) {
LOG.info("Producer exception: " + error);
error.printStackTrace();
}
@Override
public void transportInterupted() {
}
@Override
public void transportResumed() {
}
});
producer.start();
}
use of org.apache.activemq.transport.Transport in project activemq-artemis by apache.
the class FailoverTransportBrokerTest method createConnection.
protected StubConnection createConnection() throws Exception {
Transport transport = TransportFactory.connect(new URI(newURI(0)));
StubConnection connection = new StubConnection(transport);
connections.add(connection);
return connection;
}
use of org.apache.activemq.transport.Transport in project activemq-artemis by apache.
the class FailoverTransportBrokerTest method createRemoteConnection.
protected StubConnection createRemoteConnection() throws Exception {
Transport transport = TransportFactory.connect(new URI(newURI(1)));
StubConnection connection = new StubConnection(transport);
connections.add(connection);
return connection;
}
use of org.apache.activemq.transport.Transport in project activemq-artemis by apache.
the class FanoutTransportBrokerTest method createRemoteConnection.
protected StubConnection createRemoteConnection() throws Exception {
Transport transport = TransportFactory.connect(new URI(newURI(1)));
StubConnection connection = new StubConnection(transport);
connections.add(connection);
return connection;
}
use of org.apache.activemq.transport.Transport in project activemq-artemis by apache.
the class FanoutTransportBrokerTest method createConnection.
protected StubConnection createConnection() throws Exception {
Transport transport = TransportFactory.connect(new URI(newURI(0)));
StubConnection connection = new StubConnection(transport);
connections.add(connection);
return connection;
}
Aggregations