/**
* Creates a new instance of ScanDirAgent
* You will need to call {@link #init()} later on in order to initialize
* the application.
* @see #main
**/
public ScanDirAgent() {
// Initialize the notification queue
queue = new LinkedBlockingQueue<Notification>();
// Creates the listener.
listener = new NotificationListener() {
public void handleNotification(Notification notification,
Object handback) {
try {
// Just put the received notification in the queue.
// It will be consumed later on by 'waitForClose()'
//
LOG.finer("Queuing received notification "+notification);
queue.put(notification);
} catch (InterruptedException ex) {
// OK
}
}
};
}
ScanDirAgent.java 文件源码
java
阅读 26
收藏 0
点赞 0
评论 0
项目:jdk8u-jdk
作者:
评论列表
文章目录