Package org.opennms.core.ipc.twin.api
Interface TwinSubscriber
-
- All Superinterfaces:
java.lang.AutoCloseable
,java.io.Closeable
- All Known Subinterfaces:
LocalTwinSubscriber
- All Known Implementing Classes:
AbstractTwinSubscriber
,GrpcTwinSubscriber
,JmsTwinSubscriber
,KafkaTwinSubscriber
,LocalTwinSubscriberImpl
,MemoryTwinSubscriber
public interface TwinSubscriber extends java.io.Closeable
TwinSubscriber lives on Minion that handles all the Object subscriptions on Minion. At boot up, a module that lives on Minion issues an RPC from Minion to OpenNMS to get an object. Subsequent updates of the object will come as reverse sink messages from OpenNMS to Minion
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> java.io.Closeable
subscribe(java.lang.String key, java.lang.Class<T> clazz, java.util.function.Consumer<T> consumer)
-
-
-
Method Detail
-
subscribe
<T> java.io.Closeable subscribe(java.lang.String key, java.lang.Class<T> clazz, java.util.function.Consumer<T> consumer)
- Type Parameters:
T
- T is an object type that needs to be replicated from OpenNMS to Minion.- Parameters:
key
- Unique key for the object.clazz
- Specific bean class of T to marshal/unmarshal.consumer
- Consumer of T for subsequent updates to T.- Returns:
- Closeable to close the subscription of T.
-
-