protected List<ExecContext> getExecContexts(Event event) {
BytemanConfiguration config = BytemanConfiguration.from(descriptorInst.get());
List<ExecContext> list = new ArrayList<>();
if (config.clientAgentPort() == config.containerAgentPort()) {
ExecContext context = new ExecContext(config.clientAgentPort(), EnumSet.complementOf(EnumSet.of(ExecType.CONTAINER)), config);
list.add(context);
} else {
list.add(new ExecContext(config.clientAgentPort(), EnumSet.complementOf(EnumSet.of(ExecType.CONTAINER, ExecType.CLIENT_CONTAINER)), config));
String address = readAddress(event);
ExecContext remote;
if (address != null) {
remote = new ExecContext(address, config.containerAgentPort(), EnumSet.of(ExecType.CLIENT_CONTAINER), config);
} else {
remote = new ExecContext(config.containerAgentPort(), EnumSet.of(ExecType.CLIENT_CONTAINER), config);
}
list.add(remote);
}
return list;
}