public < T extends Sink > void addSinkType ( String typeName , Class < T > sinkClass ) { LOG . info ( "Adding sinkType: " + typeName + " -> " + sinkClass . getCanonicalName ( ) ) ; Multibinder < TypeHolder > bindings = Multibinder . newSetBinder ( binder ( ) , TypeHolder . class ) ; bindings . addBinding ( ) . toInstance ( new TypeHolder ( typeName , sinkClass ) ) ; }
Add a sink implementation to Suro . typeName is the expected value of the type field of a JSON configuration .