use of org.apache.qpid.server.plugin.ProtocolEngineCreator in project qpid-broker-j by apache.
the class Main method printVersion.
private void printVersion() {
final StringBuilder protocol = new StringBuilder("AMQP version(s) [major.minor]: ");
boolean first = true;
Set<Protocol> protocols = new TreeSet<>();
for (ProtocolEngineCreator installedEngine : (new QpidServiceLoader()).instancesOf(ProtocolEngineCreator.class)) {
protocols.add(installedEngine.getVersion());
}
for (Protocol supportedProtocol : protocols) {
if (first) {
first = false;
} else {
protocol.append(", ");
}
protocol.append(supportedProtocol.getProtocolVersion());
}
System.out.println(CommonProperties.getVersionString() + " (" + protocol + ")");
}
Aggregations