Package org.opennms.core.ipc.twin.api
Interface TwinPublisher
-
- All Superinterfaces:
java.lang.AutoCloseable
,java.io.Closeable
- All Known Implementing Classes:
AbstractTwinPublisher
,GrpcTwinPublisher
,JmsTwinPublisher
,KafkaTwinPublisher
,MemoryTwinPublisher
,OsgiTwinPublisher
public interface TwinPublisher extends java.io.Closeable
TwinPublisher lives on OpenNMS that handles all the Objects that need to be replicated. At boot up, modules register module specific key with TwinPublisher. Modules publish initial objects/updated objects on the session.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
TwinPublisher.Session<T>
Session that can publish initial objects and updates to T.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default <T> TwinPublisher.Session<T>
register(java.lang.String key, java.lang.Class<T> clazz)
<T> TwinPublisher.Session<T>
register(java.lang.String key, java.lang.Class<T> clazz, java.lang.String location)
-
-
-
Method Detail
-
register
<T> TwinPublisher.Session<T> register(java.lang.String key, java.lang.Class<T> clazz, java.lang.String location) throws java.io.IOException
- Type Parameters:
T
- type of object for replication- Parameters:
key
- unique key for the object.clazz
- a class used for serialization.location
- targeted Minion location for the object, set null for all locations.- Returns:
- Session which provides updates to object.
- Throws:
java.io.IOException
-
register
default <T> TwinPublisher.Session<T> register(java.lang.String key, java.lang.Class<T> clazz) throws java.io.IOException
- Throws:
java.io.IOException
-
-