use of org.hornetq.api.core.UDPBroadcastGroupConfiguration in project wildfly by wildfly.
the class LegacyConnectionFactoryService method translateDiscoveryGroupConfiguration.
private DiscoveryGroupConfiguration translateDiscoveryGroupConfiguration(org.apache.activemq.artemis.api.core.DiscoveryGroupConfiguration newDiscoveryGroupConfiguration) throws StartException {
org.apache.activemq.artemis.api.core.BroadcastEndpointFactory newBroadcastEndpointFactory = newDiscoveryGroupConfiguration.getBroadcastEndpointFactory();
BroadcastEndpointFactoryConfiguration legacyBroadcastEndpointFactory;
if (newBroadcastEndpointFactory instanceof org.apache.activemq.artemis.api.core.UDPBroadcastEndpointFactory) {
org.apache.activemq.artemis.api.core.UDPBroadcastEndpointFactory factory = (org.apache.activemq.artemis.api.core.UDPBroadcastEndpointFactory) newBroadcastEndpointFactory;
legacyBroadcastEndpointFactory = new UDPBroadcastGroupConfiguration(factory.getGroupAddress(), factory.getGroupPort(), factory.getLocalBindAddress(), factory.getLocalBindPort());
} else if (newBroadcastEndpointFactory instanceof org.apache.activemq.artemis.api.core.ChannelBroadcastEndpointFactory) {
org.apache.activemq.artemis.api.core.ChannelBroadcastEndpointFactory factory = (org.apache.activemq.artemis.api.core.ChannelBroadcastEndpointFactory) newBroadcastEndpointFactory;
legacyBroadcastEndpointFactory = new org.hornetq.api.core.JGroupsBroadcastGroupConfiguration(factory.getChannel(), factory.getChannelName());
} else {
throw MessagingLogger.ROOT_LOGGER.unsupportedBroadcastGroupConfigurationForLegacy(newBroadcastEndpointFactory.getClass().getName());
}
return new DiscoveryGroupConfiguration(newDiscoveryGroupConfiguration.getName(), newDiscoveryGroupConfiguration.getRefreshTimeout(), newDiscoveryGroupConfiguration.getDiscoveryInitialWaitTimeout(), legacyBroadcastEndpointFactory);
}
Aggregations