Package rx.plugins

Class RxJavaPlugins


  • public class RxJavaPlugins
    extends java.lang.Object
    Registry for plugin implementations that allows global override and handles the retrieval of correct implementation based on order of precedence:
    1. plugin registered globally via register methods in this class
    2. plugin registered and retrieved using System.getProperty(String) (see get methods for property names)
    3. default implementation

    In addition to the rxjava.plugin.[simple classname].implementation system properties, you can define two system property:

    
     rxjava.plugin.[index].class}
     rxjava.plugin.[index].impl}
     
    Where the .class property contains the simple classname from above and the .impl contains the fully qualified name of the implementation class. The [index] can be any short string or number of your choosing. For example, you can now define a custom RxJavaErrorHandler via two system property:
    
     rxjava.plugin.1.class=RxJavaErrorHandler
     rxjava.plugin.1.impl=some.package.MyRxJavaErrorHandler
     
    See Also:
    RxJava Wiki: Plugins Use the RxJavaHooks features instead which let's you change individual handlers at runtime.