List of usage examples for com.liferay.portal.kernel.messaging Destination getName
public String getName();
From source file:com.liferay.adaptive.media.internal.messaging.AdaptiveMediaMessagingConfigurator.java
License:Open Source License
@Activate public void activate(BundleContext bundleContext) { DestinationConfiguration destinationConfiguration = new DestinationConfiguration( DestinationConfiguration.DESTINATION_TYPE_SERIAL, AdaptiveMediaDestinationNames.ADAPTIVE_MEDIA_PROCESSOR); 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.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.exportimport.lifecycle.ExportImportLifecycleManagerImpl.java
License:Open Source License
protected ServiceRegistration<Destination> registerDestination(BundleContext bundleContext, String destinationType, String destinationName) { DestinationConfiguration destinationConfiguration = new DestinationConfiguration(destinationType, destinationName);//w w w . j a v a 2s .co m Destination destination = _destinationFactory.createDestination(destinationConfiguration); Dictionary<String, Object> dictionary = new HashMapDictionary<>(); dictionary.put("destination.name", destination.getName()); ServiceRegistration<Destination> serviceRegistration = bundleContext.registerService(Destination.class, destination, dictionary); _serviceRegistrations.add(serviceRegistration); return serviceRegistration; }
From source file:com.liferay.osb.scv.internal.messaging.SourceUserMapperMessagingConfigurator.java
License:Open Source License
@Activate protected void activate(BundleContext bundleContext) { _bundleContext = bundleContext;// w w w .j a v a 2 s. c o 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;// ww w. ja v a 2 s .c o m 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()); }
From source file:com.liferay.sync.internal.configurator.SyncConfigurator.java
License:Open Source License
protected ServiceRegistration<Destination> registerMessageListener(String destinationName) { DestinationConfiguration destinationConfiguration = new DestinationConfiguration( DestinationConfiguration.DESTINATION_TYPE_SERIAL, destinationName); Destination destination = _destinationFactory.createDestination(destinationConfiguration); Dictionary<String, Object> destinationProperties = new HashMapDictionary<>(); destinationProperties.put("destination.name", destination.getName()); return _bundleContext.registerService(Destination.class, destination, destinationProperties); }