View Javadoc

1   package cz.cuni.amis.pogamut.base.utils.logging.jmx;
2   
3   import java.io.Serializable;
4   import java.util.logging.LogRecord;
5   
6   import javax.management.Notification;
7   
8   public class JMXLogRecordNotification extends Notification implements Serializable {
9   	
10  	private static final long serialVersionUID = 7167453889653639394L;
11  
12  	public static final String NOTIFICATION_TYPE = "notifications.pogamut.jmx.logrecord";
13  	
14  	private JMXLogRecordContainer logRecordContainer = null;
15  	
16  	public JMXLogRecordNotification(Object source, long sequenceNumber, long timeStamp, String msg, LogRecord logRecord) {
17  		super(NOTIFICATION_TYPE, source, sequenceNumber, timeStamp, msg);
18  
19  
20          this.logRecordContainer = new JMXLogRecordContainer(logRecord);
21  
22          this.setUserData(logRecordContainer);
23  
24    /*      System.out.println("JMXLogRecordInfo, number of parameters " + logRecord.getParameters().length);
25          for (Object o : logRecord.getParameters()) {
26              System.out.println(" * " + o + " class " + (o == null ? "null" : o.getClass()));
27          }
28  
29          logRecordContainer.printInfo();
30  */
31  	}
32  	
33  }