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 TypeMethodDescriptionvoid
close()
Closes thisEmbeddedWorkerInstanceContainer
.Gets theInstance
managed by this container.default InstanceId
Gets theInstanceId
assigned 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 theInstance
managed by this container.- Returns:
- the instance
-
getInstanceId
Gets theInstanceId
assigned 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:
close
in interfaceAutoCloseable
-