Jini服务管理与安全机制解析
1. Jini服务管理实现
1.1 SnapshotThread类
ServiceImpl 的 updatePerformed 方法可以被重写以执行特定于服务的处理,例如确定应捕获哪些信息以及捕获的频率。以下是 SnapshotThread 类的代码:
// ServiceImpl called by PersistentStore
public void updatePerformed(int updateCount) {
snapshotter.takeSnapshot();
}
/**
* Thread that performs the actual snapshots, done in a separate
thread
* so it will not hang up in progress remote calls
*/
private class SnapshotThread extends Thread {
/** Create a daemon thread */
private SnapshotThread() {
super("snapshot thread");
setDaemon(true);
}
/** Signal this thread that it should take a snapshot */
private synchronized void takeSnap
Jini服务管理与安全机制解析
超级会员免费看
订阅专栏 解锁全文
56

被折叠的 条评论
为什么被折叠?



