View Javadoc
1   package psl;
2   
3   import ensure.Ensure;
4   
5   
6   /**
7    * Implementation of the MX Bean of the dispatcher thread factory.
8    */
9   class DispatcherThreadFactoryMXBeanImpl
10  		implements DispatcherThreadFactoryMXBean {
11  	/**
12  	 * The thraed factory.
13  	 */
14  	private DispatcherThreadFactory m_factory;
15  	
16  	/**
17  	 * Creates a new MX bean implementation.
18  	 * @param factory the factory
19  	 */
20  	DispatcherThreadFactoryMXBeanImpl(DispatcherThreadFactory factory) {
21  		Ensure.not_null(factory, "factory == null");
22  		m_factory = factory;
23  	}
24  	
25  	@Override
26  	public String getName() {
27  		return m_factory.name();
28  	}
29  	
30  	@Override
31  	public int getThreadCount() {
32  		return m_factory.thread_count();
33  	}
34  }