public class BulletPubSubResponder extends PubSubResponder
PubSubResponder
if async results should be sent to a PubSub
interface. This simply
creates an instance of a PubSub
from your provided BulletConfig
and tries to create a
Publisher
from it to respond with results to.Modifier and Type | Field and Description |
---|---|
protected Publisher |
publisher |
protected PubSub |
pubSub |
config
Constructor and Description |
---|
BulletPubSubResponder(BulletConfig config)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
respond(String id,
PubSubMessage message)
Respond to a
PubSubMessage . |
public BulletPubSubResponder(BulletConfig config)
config
- The BulletConfig
to use.public void respond(String id, PubSubMessage message)
PubSubResponder
PubSubMessage
.respond
in class PubSubResponder
id
- The id of the response.message
- The actual PubSubMessage
containing the response.public void close()
close
in interface AutoCloseable
close
in class PubSubResponder
Copyright © 2021. All rights reserved.