|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jpl.mipl.uplink.tour.ConstraintCheck
The ConstraintCheck class is the client program of the Remote Constraint Checker capability. The Remote Constraint Checker is a tool that allows Instrument Teams outside of JPL to constraint check their Interface files (IOI). This class takes a list of Interface files and submits them to the server for checking. The communication between the client and the server is accomplished using the FEI client. The input to this class is a list of Interface files, and the output is a log file that contains the results of constraint checking. The way this class works is basically like so. It attempts to add a lockfile to one of the available filetypes. The lockfile is a file with a special name that designates to all other clients that this filetype is in use. Then this class add the Interface files to the filetype and waits for the server to constraint check them. When the server is done constraint checking, it puts the results in a log file back on the filetype. This client then retieves the log file. To use this class first call the processArgs() method to pass in the list of Interface files and the log file name. Then call process() to perform the constraint checking. Because this class uses FEI commands for communication, the user must obtain a kerberos ticket prior to running this program. Also, the user must have permission to run the following FEI commands: feiadd, feireplace, feilist, feiget, and feimakeclean on the list of available filetypes. History: 11-27-02 Elias Sayfi - Ver 1.0, Initial delivery 03-03-03 Elias Sayfi - Ver 2.0, Modified for delivery to team. Removed filetypes 3 thru 10 04-11-03 Elias Sayfi - Ver 2.1, Added the timeout flag Modified to add server_down file and delete lock file on exit instead of deleting all the files in the filetype. This keeps other clients from connecting while the server is busy. The server will delete the server_down file when it is ready to process another client.
VimsRemoteCC
,
IssRemoteCC
,
ExitRoutine
,
RunCommand
Constructor Summary | |
ConstraintCheck()
Default constructor. |
|
ConstraintCheck(Vector args)
Constructor. |
Method Summary | |
boolean |
allServersDown()
This method compares the list of available filetypes (FILETYPES_LIST) with the list of filetypes that it found have a SERVER_DOWN file on them designating that the server is not running. |
boolean |
connectToServer()
This method calls the getFiletype method to find an open filetype. |
void |
createTempFiles(boolean createLock,
boolean createGo,
boolean createUsing)
This method creates 4 temporary files. |
boolean |
getFiletype()
This method attempts to locate a filetype that is not currently in use. |
void |
printDebug(String st)
Print out debug message. |
void |
printError(int n,
String st)
Print out an error message. |
void |
process()
This is the principal method of this class. |
boolean |
processArgs(Vector args)
Examine the elements of the args Vector and get the Interface filenames and the name to assign to the log file if it's there. |
boolean |
sendGoFile()
Attempt to add the go file to the filetype that has been established for communication to the server. |
boolean |
sendInputFiles()
Send the Interface files to the server, by using the REPLACE command to add them to the reserved filetype. |
void |
sleep(int msec)
Pause for the specified number of milliseconds. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ConstraintCheck()
public ConstraintCheck(Vector args)
args
- - a list of ioi filenames and possibly "-log" followed by the log filenameMethod Detail |
public void printError(int n, String st)
n
- - the number of new lines to print before the messagest
- - the error messagepublic void printDebug(String st)
st
- - the error messagepublic void createTempFiles(boolean createLock, boolean createGo, boolean createUsing)
createLock
- - designates whether or not to create the lock filecreateGo
- - designates whether or not to create the go filecreateUsing
- - designates whether or not to create the using filepublic boolean getFiletype()
public boolean allServersDown()
public boolean processArgs(Vector args)
public void sleep(int msec)
msec
- - the number of millisecs to pausepublic boolean connectToServer()
public boolean sendInputFiles()
public boolean sendGoFile()
public void process()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |