pub struct ResourceCommandHandler { /* private fields */ }Expand description
Handles resource management commands for cleanup and connection management.
Provides functionality for disposing of Service Bus resources, resetting connections, and performing cleanup operations. Essential for proper resource lifecycle management and error recovery.
§Examples
use quetty_server::service_bus_manager::command_handlers::ResourceCommandHandler;
let handler = ResourceCommandHandler::new(consumer_manager, producer_manager);
// Dispose of current consumer
let response = handler.handle_dispose_consumer().await?;
// Clean up all resources
let response = handler.handle_dispose_all_resources().await?;
// Reset connection
let response = handler.handle_reset_connection().await?;Implementations§
Source§impl ResourceCommandHandler
impl ResourceCommandHandler
pub fn new( consumer_manager: Arc<Mutex<ConsumerManager>>, producer_manager: Arc<Mutex<ProducerManager>>, ) -> Self
pub async fn handle_dispose_consumer( &self, ) -> Result<ServiceBusResponse, ServiceBusError>
pub async fn handle_dispose_all_resources( &self, ) -> Result<ServiceBusResponse, ServiceBusError>
Auto Trait Implementations§
impl Freeze for ResourceCommandHandler
impl !RefUnwindSafe for ResourceCommandHandler
impl Send for ResourceCommandHandler
impl Sync for ResourceCommandHandler
impl Unpin for ResourceCommandHandler
impl !UnwindSafe for ResourceCommandHandler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more