Package dev.getelements.elements.test
Interface EmbeddedInstanceContainer
- All Superinterfaces:
AutoCloseable
- All Known Subinterfaces:
EmbeddedClientInstanceContainer,EmbeddedWorkerInstanceContainer
- All Known Implementing Classes:
JeroMQEmbeddedClientInstanceContainer,JeroMQEmbeddedInstanceContainer,JeroMQEmbeddedWorkerInstanceContainer
Base interface for an embedded
Instance container.-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes thisEmbeddedWorkerInstanceContainer.Gets theInstancemanaged by this container.default InstanceIdGets theInstanceIdassigned to this container.onClose(Consumer<? super EmbeddedInstanceContainer> consumer) Registers for a notification when this instance closes.start()Starts thisEmbeddedWorkerInstanceContainer.
-
Method Details
-
getInstance
Instance getInstance()Gets theInstancemanaged by this container.- Returns:
- the instance
-
getInstanceId
Gets theInstanceIdassigned to this container.- Returns:
-
start
EmbeddedInstanceContainer start()Starts thisEmbeddedWorkerInstanceContainer.- Returns:
- this instance
-
onClose
Registers for a notification when this instance closes.- Parameters:
consumer- the consumer which receives this event- Returns:
- an instance of
Subscription
-
close
void close()Closes thisEmbeddedWorkerInstanceContainer.- Specified by:
closein interfaceAutoCloseable
-