@ SuppressWarnings ( "checkstyle:diamondoperatorforvariabledefinition" ) public AutoCloseable registerHandler ( final RemoteIdentifier sourceIdentifier , final Class < ? extends T > messageType , final EventHandler < ? super T > theHandler ) { final Tuple2 < RemoteIdentifier , Class < ? extends T > > tuple = new Tuple2 < RemoteIdentifier , Class < ? extends T > > ( sourceIdentifier , messageType ) ; this . tupleToHandlerMap . put ( tuple , theHandler ) ; LOG . log ( Level . FINER , "Add handler for tuple: {0},{1}" , new Object [ ] { tuple . getT1 ( ) , tuple . getT2 ( ) . getCanonicalName ( ) } ) ; return new SubscriptionHandler <> ( tuple , this . unsubscribeTuple ) ; }
Subscribe for events from a given source and message type .