Interface AmqpResourceParent
- All Known Implementing Classes:
AmqpConnection,AmqpConnectionSession,AmqpProvider,AmqpSession,AmqpTransactionContext
public interface AmqpResourceParent
Interface for any object that can will manage the lifetime of AmqpResource
based object instances.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddChildResource(AmqpResource resource) Adds the given resource as a child of this resource so that it's lifetime becomes managed by that of its parent.voidremoveChildResource(AmqpResource resource) Removes the given resource from the registered child resources managed by this one.
-
Method Details
-
addChildResource
Adds the given resource as a child of this resource so that it's lifetime becomes managed by that of its parent.- Parameters:
resource- The AmqpResource that is a child of this one.
-
removeChildResource
Removes the given resource from the registered child resources managed by this one.- Parameters:
resource- The AmqpResource that is no longer a child of this one.
-
getProvider
AmqpProvider getProvider()- Returns:
- a reference to the root AmqpProvider.
-