Add option to turn on an OpenWire TCP endpoint.

This commit is contained in:
Timothy Bish 2014-05-15 11:58:49 -04:00
parent ff64b14bc7
commit b83a3d4388
1 changed files with 11 additions and 0 deletions

View File

@ -64,6 +64,7 @@ public class AmqpTestSupport {
protected int sslPort;
protected int nioPort;
protected int nioPlusSslPort;
protected int openwirePort;
public static void main(String[] args) throws Exception {
final AmqpTestSupport s = new AmqpTestSupport();
@ -123,6 +124,12 @@ public class AmqpTestSupport {
protected void addAMQPConnector() throws Exception {
TransportConnector connector = null;
if (isUseOpenWireConnector()) {
connector = brokerService.addConnector(
"tcp://0.0.0.0:" + openwirePort);
openwirePort = connector.getConnectUri().getPort();
LOG.debug("Using openwire port " + openwirePort);
}
if (isUseTcpConnector()) {
connector = brokerService.addConnector(
"amqp://0.0.0.0:" + port + "?transport.transformer=" + getAmqpTransformer());
@ -149,6 +156,10 @@ public class AmqpTestSupport {
}
}
protected boolean isUseOpenWireConnector() {
return false;
}
protected boolean isUseTcpConnector() {
return true;
}