List of usage examples for com.liferay.portal.kernel.messaging DestinationConfiguration DESTINATION_TYPE_PARALLEL
String DESTINATION_TYPE_PARALLEL
To view the source code for com.liferay.portal.kernel.messaging DestinationConfiguration DESTINATION_TYPE_PARALLEL.
Click Source Link
From source file:com.liferay.adaptive.media.internal.messaging.AMMessagingConfigurator.java
License:Open Source License
@Activate public void activate(BundleContext bundleContext, Map<String, Object> properties) { _amConfiguration = ConfigurableUtil.createConfigurable(AMConfiguration.class, properties); DestinationConfiguration destinationConfiguration = new DestinationConfiguration( DestinationConfiguration.DESTINATION_TYPE_PARALLEL, AMDestinationNames.ADAPTIVE_MEDIA_PROCESSOR); destinationConfiguration.setWorkersCoreSize(_amConfiguration.workersCoreSize()); destinationConfiguration.setWorkersMaxSize(_amConfiguration.workersMaxSize()); Destination destination = _destinationFactory.createDestination(destinationConfiguration); Dictionary<String, Object> dictionary = new HashMapDictionary<>(); dictionary.put("destination.name", destination.getName()); _serviceRegistration = bundleContext.registerService(Destination.class, destination, dictionary); }
From source file:com.liferay.osb.scv.internal.messaging.SourceUserMapperMessagingConfigurator.java
License:Open Source License
@Activate protected void activate(BundleContext bundleContext) { _bundleContext = bundleContext;/*www.ja v a 2 s. co m*/ DestinationConfiguration destinationConfiguration = new DestinationConfiguration( DestinationConfiguration.DESTINATION_TYPE_PARALLEL, "liferay/scv_source"); Destination destination = _destinationFactory.createDestination(destinationConfiguration); Dictionary<String, Object> properties = new HashMapDictionary<>(); properties.put("destination.name", destination.getName()); _destinationServiceRegistration = bundleContext.registerService(Destination.class, destination, properties); destination.register(new SourceUserMapperMessageListener()); }
From source file:com.liferay.osb.scv.user.mapper.internal.messaging.UserMapperMessagingConfigurator.java
License:Open Source License
@Activate protected void activate(BundleContext bundleContext) { _bundleContext = bundleContext;//from ww w. ja v a 2s . com DestinationConfiguration destinationConfiguration = new DestinationConfiguration( DestinationConfiguration.DESTINATION_TYPE_PARALLEL, UserMapperDestinationNames.SCV_USER_MAPPER); Destination destination = _destinationFactory.createDestination(destinationConfiguration); Dictionary<String, Object> properties = new HashMapDictionary<>(); properties.put("destination.name", destination.getName()); _destinationServiceRegistration = bundleContext.registerService(Destination.class, destination, properties); destination.register(new UserMapperMessageListener()); }