Class PlatformClusterEventSender
- java.lang.Object
-
- de.hybris.platform.servicelayer.event.impl.SpringEventSender
-
- de.hybris.platform.servicelayer.event.impl.PlatformClusterEventSender
-
- All Implemented Interfaces:
BinaryBroadcastListener,EventSender,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
public class PlatformClusterEventSender extends SpringEventSender implements BinaryBroadcastListener
Extends the classSpringEventSenderand sends theAbstractEvents in thesendEvent(AbstractEvent)as UDP packets in a cluster system. The packet will be de~/serialized.
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.servicelayer.event.impl.SpringEventSender
applicationContext
-
-
Constructor Summary
Constructors Constructor Description PlatformClusterEventSender()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.util.concurrent.ExecutorgetExecutor()Gets the executor used for sending local events asynchronous.protected booleanisForOwnTenant(AbstractEvent event)voidpostConstruct()Deprecated, for removal: This API element is subject to removal in a future version.since agesvoidpreDestroy()voidprocessPacket(byte[] message)be aware of the fact that this is running in a different thread!voidregisterBinaryListenerHook()voidsendEvent(AbstractEvent event)Sends the givenAbstractEventdepending on the environment.voidsetExecutor(java.util.concurrent.Executor executor)Sets the executor to use for sending local events asynchronous.voidsetSerializationService(SerializationService serializationService)voidsetTenant(Tenant tenant)-
Methods inherited from class de.hybris.platform.servicelayer.event.impl.SpringEventSender
setApplicationContext
-
-
-
-
Method Detail
-
sendEvent
public void sendEvent(AbstractEvent event)
Description copied from interface:EventSenderSends the givenAbstractEventdepending on the environment.- Specified by:
sendEventin interfaceEventSender- Overrides:
sendEventin classSpringEventSender- Parameters:
event- the event to be send.
-
postConstruct
@Deprecated(since="ages", forRemoval=true) @PostConstruct public void postConstruct()Deprecated, for removal: This API element is subject to removal in a future version.since ages
-
registerBinaryListenerHook
public void registerBinaryListenerHook()
-
preDestroy
@PreDestroy public void preDestroy()
-
processPacket
public void processPacket(byte[] message)
be aware of the fact that this is running in a different thread!- Specified by:
processPacketin interfaceBinaryBroadcastListener
-
isForOwnTenant
protected boolean isForOwnTenant(AbstractEvent event)
-
setExecutor
public void setExecutor(java.util.concurrent.Executor executor)
Sets the executor to use for sending local events asynchronous. If this property is set, ALL(!!) local events will be sent asynchronously by the specified Executor.- Parameters:
executor- executor to use or null for synchronous sending
-
getExecutor
public java.util.concurrent.Executor getExecutor()
Gets the executor used for sending local events asynchronous. Returns null if local events are send synchronous.- Returns:
- executor or null
-
setSerializationService
public void setSerializationService(SerializationService serializationService)
-
setTenant
public void setTenant(Tenant tenant)
-
-