Class JvmPublisher
java.lang.Object
org.chenile.pubsub.jvm.pub.JvmPublisher
- All Implemented Interfaces:
ChenilePub
JVM/in-process implementation of
ChenilePub.
Supports synchronous publish and executor-backed asynchronous publish.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ExecutorServiceprivate final JvmSubscriberprivate static final org.slf4j.Loggerprivate final PubSubInfoProviderprivate final JvmPubSubStorage -
Constructor Summary
ConstructorsConstructorDescriptionJvmPublisher(PubSubInfoProvider pubSubInfoProvider, JvmSubscriber jvmSubscriber, ExecutorService executorService, JvmPubSubStorage storage) -
Method Summary
Modifier and TypeMethodDescriptionvoidStore and dispatch the message through the configured executor so caller thread returns immediately.private voidvoidvoidpublishToOperation(String service, String operationName, String payload, Map<String, Object> properties) private voidprivate static StringsubstituteProperties(String text, Map<String, Object> properties)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
pubSubInfoProvider
-
jvmSubscriber
-
executorService
-
storage
-
-
Constructor Details
-
JvmPublisher
public JvmPublisher(PubSubInfoProvider pubSubInfoProvider, JvmSubscriber jvmSubscriber, ExecutorService executorService, JvmPubSubStorage storage)
-
-
Method Details
-
publishToOperation
public void publishToOperation(String service, String operationName, String payload, Map<String, Object> properties) - Specified by:
publishToOperationin interfaceChenilePub
-
publish
-
asyncPublish
Store and dispatch the message through the configured executor so caller thread returns immediately.- Specified by:
asyncPublishin interfaceChenilePub
-
handleEvent
-
substituteProperties
-
store
-
CHENILE