Package io.dapr.client
Class Subscription<T>
java.lang.Object
io.dapr.client.Subscription<T>
- Type Parameters:
T- Application's object type.
- All Implemented Interfaces:
Closeable,AutoCloseable
Streaming subscription of events for Dapr's pubsub.
-
Method Summary
Modifier and TypeMethodDescriptionvoidAwaits (blocks) for subscription to end.voidclose()Stops the subscription.
-
Method Details
-
close
public void close()Stops the subscription.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
awaitTermination
Awaits (blocks) for subscription to end.- Throws:
InterruptedException- Exception if interrupted while awaiting.
-