|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ptc.windchill.index.indexloader.IndexEntryToRware
This class represents the focal point of the indexing program. A new instance is created for each request. This class reads a stream from the indexer and writes a formatted string that uses a RetrievalWare API to initiate the indexing of that file. *
Supported API: false
Extendable: false
Field Summary | |
private static byte[] |
arrPcLineSep
|
private BufferedInputStream |
bufferedInputStream
|
private String |
encoding
|
private static String |
filesep
|
private LinkedList |
indexables
|
private static boolean |
initialized
|
private InputStream |
inputStreamIn
|
private static long |
lastDeleteFileRan
|
(package private) int |
lineno
|
private static byte[] |
linesep
|
private static RwareInterfaceException |
logException
|
private String |
operation
|
private OutputStream |
outputStreamIn
|
private ServletConstants |
servletConstants
|
private static File |
tDir
|
private static String |
tempDir
|
private File |
tempFile
|
private long |
tempTimer
|
private int |
version
|
Constructor Summary | |
IndexEntryToRware()
Creates a new IndexEntryToExcalibur object for our http scheme. |
Method Summary | |
void |
clearInputStream(BufferedInputStream bufferedInputStream)
This method is used to empty the input stream so that the writer to the stream will not block. |
void |
clearLob(String number_bytes_string)
This function is used to empty the InputStream of a LOB when an error occurs. |
private void |
execute(boolean index)
|
private String |
getRestLine(IndexStringTokenizer tokenizer)
|
private boolean |
isComment(String token)
Returns true if the token string is a comment. |
boolean |
meetsCriteria(long lastModified,
long present,
long ageInMinutes)
|
private void |
performOperation(boolean index)
|
void |
processRequest(IndexLoaderRequest request,
IndexLoaderResponse response)
Process request received from the client via http. |
private void |
readHeader()
Read the index entry "header" infomation to find the operation. |
private String |
readLine()
Deprecated. This method does not properly convert bytes to characters. As of JDK 1.1, the preferred way to read lines of text is via the BufferedReader.readLine() method. Programs that use the
DataInputStream class to read lines can be converted to use
the BufferedReader class by replacing code of the form:
with:DataInputStream d = new DataInputStream(in); BufferedReader d = new BufferedReader(new InputStreamReader(in)); |
void |
removeOldFiles(long ageInMinutes)
|
void |
run()
The entry point to the index loading process. |
boolean |
setServletConstants(ServletConstants sc)
|
private void |
update(boolean update)
Create a file to be used as input to the RetrievalWare supplied method CqdhClient.cqdh_process_file_clnt_1. |
private String |
writeRemoteLob(String number_bytes_string,
String appOID,
String contentFileName)
Write the lob to the stream. |
private void |
writeTokenStream()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private BufferedInputStream bufferedInputStream
private static RwareInterfaceException logException
private InputStream inputStreamIn
private OutputStream outputStreamIn
private final String encoding
private File tempFile
private static String tempDir
private String operation
private long tempTimer
private static long lastDeleteFileRan
private static String filesep
private static byte[] linesep
private static File tDir
private static boolean initialized
private int version
int lineno
private ServletConstants servletConstants
private LinkedList indexables
private static byte[] arrPcLineSep
Constructor Detail |
public IndexEntryToRware()
Method Detail |
public void processRequest(IndexLoaderRequest request, IndexLoaderResponse response) throws IOException
IOException
public void clearInputStream(BufferedInputStream bufferedInputStream)
public void clearLob(String number_bytes_string)
public void run()
run
in interface Runnable
private void readHeader() throws RwareInterfaceException
RwareInterfaceException
private boolean isComment(String token)
token
- string to check for comment characters
private String writeRemoteLob(String number_bytes_string, String appOID, String contentFileName) throws RwareInterfaceException
RwareInterfaceException
private void update(boolean update) throws RwareInterfaceException
RwareInterfaceException
public void removeOldFiles(long ageInMinutes)
public boolean meetsCriteria(long lastModified, long present, long ageInMinutes)
private String getRestLine(IndexStringTokenizer tokenizer)
private void writeTokenStream() throws RwareInterfaceException
RwareInterfaceException
private void performOperation(boolean index) throws RwareInterfaceException
RwareInterfaceException
private void execute(boolean index) throws RwareInterfaceException
RwareInterfaceException
public boolean setServletConstants(ServletConstants sc)
private final String readLine() throws IOException
BufferedReader.readLine()
method. Programs that use the
DataInputStream
class to read lines can be converted to use
the BufferedReader
class by replacing code of the form:
with:DataInputStream d = new DataInputStream(in);
BufferedReader d = new BufferedReader(new InputStreamReader(in));
readLine
method of DataInput
.
Bytes for this operation are read from the contained input stream.
IOException
- if an I/O error occurs.BufferedReader.readLine()
,
FilterInputStream.in
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |