Package org.opennms.core.ipc.twin.osgi
Class OsgiTwinPublisher
- java.lang.Object
-
- org.opennms.core.ipc.twin.osgi.OsgiTwinPublisher
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,TwinPublisher
public class OsgiTwinPublisher extends Object implements TwinPublisher
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.opennms.core.ipc.twin.api.TwinPublisher
TwinPublisher.Session<T>
-
-
Constructor Summary
Constructors Constructor Description OsgiTwinPublisher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
<T> TwinPublisher.Session<T>
register(String key, Class<T> clazz, String location)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opennms.core.ipc.twin.api.TwinPublisher
register
-
-
-
-
Method Detail
-
register
public <T> TwinPublisher.Session<T> register(String key, Class<T> clazz, String location) throws IOException
- Specified by:
register
in interfaceTwinPublisher
- 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:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
-