     }
     
 }
+
+extension MailBoxHandler {
+    
+    func getMailbox<MessageType>() -> Mailbox<MessageType> {
+        let associatedObject = objc_getAssociatedObject(self, &mailboxAssociationKey)
+        let mailbox: Mailbox<MessageType>
+        if associatedObject == nil {
+            mailbox = Mailbox()
+            objc_setAssociatedObject(self, &mailboxAssociationKey, mailbox, .OBJC_ASSOCIATION_RETAIN_NONATOMIC)
+        } else {
+            assert(associatedObject is Mailbox<MessageType>, "Associated Mailbox's message type does not match '\(MessageType.self)'")
+            mailbox = associatedObject as! Mailbox<MessageType> // swiftlint:disable:this force_cast
+        }
+        return mailbox
+    }
+    
+}

    
}

extension MessageHandler {
    
    func getMailbox<MessageType>() -> Mailbox<MessageType> {
        let associatedObject = objc_getAssociatedObject(self, &mailboxAssociationKey)
        let mailbox: Mailbox<MessageType>
        if associatedObject == nil {
            mailbox = Mailbox()
            objc_setAssociatedObject(self, &mailboxAssociationKey, mailbox, .OBJC_ASSOCIATION_RETAIN_NONATOMIC)
        } else {
            assert(associatedObject is Mailbox<MessageType>, "Associated Mailbox's message type does not match '\(MessageType.self)'")
            mailbox = associatedObject as! Mailbox<MessageType> // swiftlint:disable:this force_cast
        }
        return mailbox
    }
    
    func on<MessageType>(event: UIControlEvents, dispatch message: MessageType) -> Mailbox<MessageType> {
        if let oldDispatcher = getDispatcher(for: event) as MessageDispatcher<MessageType>? {

fileprivate var messageDispatcherAssociationKey = 0
fileprivate var mailboxAssociationKey = 1

protocol MessageHandler: MailBoxHandler where Self : UIControl {
    
    func getDispatcher<MessageType>(for event: UIControlEvents) -> MessageDispatcher<MessageType>?
    
    func on<MessageType>(event: UIControlEvents, dispatch message: MessageType) -> Mailbox<MessageType>
    
    func register<MessageType>(dispatcher: MessageDispatcher<MessageType>, for event: UIControlEvents)
    
