public AutoCloseable registerHandler ( final Class < ? extends T > messageType , final EventHandler < RemoteMessage < ? extends T > > theHandler ) { this . msgTypeToHandlerMap . put ( messageType , theHandler ) ; LOG . log ( Level . FINER , "Add handler for class: {0}" , messageType . getCanonicalName ( ) ) ; return new SubscriptionHandler <> ( messageType , this . unsubscribeClass ) ; }
Subscribe for events of a given message type .