Skip to content

Commit

Permalink
fix startup log
Browse files Browse the repository at this point in the history
  • Loading branch information
DC2-DanielKrueger committed Dec 17, 2024
1 parent ecc39e1 commit dca398f
Showing 1 changed file with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import com.hivemq.adapter.sdk.api.events.EventService;
import com.hivemq.adapter.sdk.api.factories.ProtocolAdapterFactory;
import com.hivemq.adapter.sdk.api.factories.ProtocolAdapterFactoryInput;
import com.hivemq.adapter.sdk.api.services.ProtocolAdapterWritingService;
import com.hivemq.edge.modules.ModuleLoader;
import com.hivemq.edge.modules.adapters.simulation.SimulationProtocolAdapterFactory;
import org.jetbrains.annotations.NotNull;
Expand All @@ -35,6 +34,7 @@
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;

@Singleton
Expand Down Expand Up @@ -104,14 +104,16 @@ public static Map<String, ProtocolAdapterFactory<?>> findAllAdapters(
}
}


final Set<String> uniqueProtocolNames = factoryMap.values()
.stream()
.map(protocolAdapterFactory -> "'" + protocolAdapterFactory.getInformation().getProtocolName() + "'")
.collect(Collectors.toSet());


log.info("Discovered {} protocol adapter-type(s): [{}].",
factoryMap.size(),
factoryMap.values()
.stream()
.map(protocolAdapterFactory -> "'" +
protocolAdapterFactory.getInformation().getProtocolName() +
"'")
.collect(Collectors.joining(", ")));
uniqueProtocolNames.size(),
String.join(", ", uniqueProtocolNames));
return factoryMap;
}

Expand Down

0 comments on commit dca398f

Please sign in to comment.