View Javadoc

1   package cz.cuni.amis.pogamut.base.utils.logging;
2   
3   import javax.management.MXBean;
4   
5   /**
6    * Part of the {@link IAgentLogger} interface that is exposed via MBean.
7    * @author Jimmy
8    */
9   @MXBean
10  public interface IJMXAgentLogger {
11  	
12  	/**
13  	 * Returns port where {@link NetworkLogManager} is listening.
14  	 * <p><p>
15  	 * Returns null if network logging is not enabled.
16  	 * 
17  	 * @return
18  	 */
19  	public Integer getNetworkLoggerPort();
20  	
21  	/**
22  	 * Returns a host where {@link NetworkLogManager} is listening.
23  	 * <p><p>
24  	 * Returns null if network logging is not enabled.
25  	 * 
26  	 * @return
27  	 */
28  	public String getNetworkLoggerHost();
29  
30  	/**
31  	 * Adds network handler to every existing {@link LogCategory} plus to every new one.
32  	 * <p><p>
33  	 * Enables utilization of {@link NetworkLogManager} for publishing all logs of this logger.
34  	 */
35  	public void addDefaultNetworkHandler();
36  	
37  	/**
38  	 * Removes default network handler from every existing {@link LogCategory}.
39  	 */
40  	public void removeDefaultNetworkHandler();
41  	
42  	/**
43  	 * Tells whether the logger has default network handler attached. 
44  	 * <p><p>
45  	 * It allows you to query whether the agent logger is outputting its logs to the {@link NetworkLogManager}
46  	 * or not.
47  	 * 
48  	 * @return
49  	 */
50  	public boolean isDefaultNetworkHandler();
51  	
52  }