List of usage examples for com.liferay.portal.kernel.messaging Destination register
public boolean register(MessageListener messageListener);
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 .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 .j ava2 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()); }