KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > bluecubs > xinco > index > XincoIndexThread


1 /**
2  *Copyright 2004 blueCubs.com
3  *
4  *Licensed under the Apache License, Version 2.0 (the "License");
5  *you may not use this file except in compliance with the License.
6  *You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  *Unless required by applicable law or agreed to in writing, software
11  *distributed under the License is distributed on an "AS IS" BASIS,
12  *WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  *See the License for the specific language governing permissions and
14  *limitations under the License.
15  *
16  *************************************************************
17  * This project supports the blueCubs vision of giving back
18  * to the community in exchange for free software!
19  * More information on: http://www.bluecubs.org
20  *************************************************************
21  *
22  * Name: XincoIndexThread
23  *
24  * Description: handle document indexing in thread
25  *
26  * Original Author: Alexander Manes
27  * Date: 2004/12/18
28  *
29  * Modifications:
30  *
31  * Who? When? What?
32  * - - -
33  *
34  *************************************************************
35  */

36
37 package com.bluecubs.xinco.index;
38
39 import com.bluecubs.xinco.core.XincoCoreData;
40 import com.bluecubs.xinco.core.server.XincoDBManager;
41
42 /**
43  * This class starts document indexing in a separate thread
44  */

45 public class XincoIndexThread extends Thread JavaDoc {
46     
47     private XincoCoreData d = null;
48     private boolean index_content = false;
49     private XincoDBManager dbm = null;
50
51     public void run() {
52         XincoIndexer.indexXincoCoreData(d, index_content, dbm);
53         try {
54             dbm.con.close();
55         } catch (Exception JavaDoc e)
56         {
57             //do nothing
58
}
59     }
60     
61     public XincoIndexThread(XincoCoreData d, boolean index_content, XincoDBManager dbm) {
62         this.d = d;
63         this.index_content = index_content;
64         this.dbm = dbm;
65     }
66     
67 }
68
Popular Tags