1 package org.testng; 2 3 /** 4 * A factory used to create instances of ITestNGListener. Users can implement this interface 5 * in any of their test classes but there can be only one such instance. 6 */ 7 public interface ITestNGListenerFactory { 8 9 /** 10 * Create and return an instance of the listener class passed in parameter. Return null 11 * if you want to use the default factory. 12 */ createListener(Class<? extends ITestNGListener> listenerClass)13 ITestNGListener createListener(Class<? extends ITestNGListener> listenerClass); 14 } 15