Package rx.plugins

Class RxJavaPlugins

java.lang.Object
rx.plugins.RxJavaPlugins

public class RxJavaPlugins extends 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: