| |
|
| java.lang.Object java.lang.Thread soif.SOIFGetter
All known Subclasses: soif.SchemaGetter, soif.TaxonomyGetter,
SOIFGetter | public class SOIFGetter extends Thread (Code) | | Thread that gets SOIF.
A status flag needs to be correctly maintained by subclasses.
Calling the constructor of this class will set the status
to PREPARED. Constructors of subclasses that do not call
this constructor should mark the status as PREPARED.
Subclasses that override the run() method should mark the
status as PROCESSING as early as possible in the subclass's
run() method. When the subclass's run() method completes,
the status should be marked COMPLETE for successful completion
or ABEND for completion with errors. If the subclass calls
this class's getSOIF() method and the status gets set to
ABEND by this class's getSOIF() method, that status should
not be changed to COMPLETE by the subclass. Once the status
is set to ABEND, it cannot be changed to COMPLETE. The status
is maintained by a setStatus() method which enforces the
ABEND/COMPLETE restriction and cannot be overridden.
An "empty" getter instance is sometimes useful; this
is created using the argumentless constructor, has a status
of UNINITIALIZED and cannot be exectuted.
Note:
The RDMHeader class is not currently used to formulate requests.
This may change.
Both SchemaGetter and TaxonomyGetter initialize
their RDM header strings with a correct RDM request.
Because there are other schema and taxonomy requests that can be
made which are currently not well (or not at all) documented
the standard request can be changed using setRDMHeader()
which allows you to put in anything but prevents you from changing
the request during processing (the scope of the processing
phase far exceeds the requirement for safe operation).
The setRDMHeader() method should be used with the
understanding that the interface will very likely change.
It is also possible that the constructors will change,
but the most likely scenario is that RDMHeader savvy
constructors will be added.
|
Field Summary | |
final public static int | ABEND Processing status: completed unsucessfully. | final public static int | COMPLETE Processing status: completed successfully. | final public static int | PREPARED Processing status: prepared to run. | final public static int | PROCESSING Processing status: running. | final public static int | UNINITIALIZED Processing status: never prepared/initialized/started. | protected CSID | csid Target Compass Server ID. | public boolean | debug Debug flag. | protected String | rdmhead RDM Header used in request. | protected SOIF | sl SOIF. | protected SOIFParser | slp SOIF parser. |
Method Summary | |
final public boolean | finished() Return whether or not processing is complete. | public SOIF | getRDMHeader() Return the RDM header SOIF that the SOIFGetter got. | protected void | getSOIF() Get some of that SOIF. | public SOIF | getSOIFList() Return the SOIF that the SOIFGetter got. | final public int | getStatus() Return processing status. | public void | run() Run the thread, get the SOIF. | public void | setRDMHead(String s) Not Supported. Set the RDM header. | final protected void | setStatus(int i) Set processing status. | public void | waitFor() Wait for the getter to finish. | public void | waitFor(int max) Wait for the getter to finish. |
ABEND | final public static int ABEND(Code) | | Processing status: completed unsucessfully.
|
COMPLETE | final public static int COMPLETE(Code) | | Processing status: completed successfully.
|
PREPARED | final public static int PREPARED(Code) | | Processing status: prepared to run.
|
PROCESSING | final public static int PROCESSING(Code) | | Processing status: running.
|
UNINITIALIZED | final public static int UNINITIALIZED(Code) | | Processing status: never prepared/initialized/started.
|
csid | protected CSID csid(Code) | | Target Compass Server ID.
|
debug | public boolean debug(Code) | | Debug flag.
|
rdmhead | protected String rdmhead(Code) | | RDM Header used in request.
|
sl | protected SOIF sl(Code) | | SOIF.
This is a list of SOIF nodes not includng any RDM header.
(XXX when using csadmingw, there is no RDM header)
|
SOIFGetter | public SOIFGetter()(Code) | | Constructor.
|
SOIFGetter | public SOIFGetter(String CGILocation, String exe, CSID csid)(Code) | | Constructor.
Parameters: CGILocation - location of the CGI target of the rdm request Parameters: exe - CGI executable which will fill rdm request Parameters: csid - compass server id |
finished | final public boolean finished()(Code) | | Return whether or not processing is complete.
|
getRDMHeader | public SOIF getRDMHeader()(Code) | | Return the RDM header SOIF that the SOIFGetter got.
|
getSOIF | protected void getSOIF()(Code) | | Get some of that SOIF.
|
getSOIFList | public SOIF getSOIFList()(Code) | | Return the SOIF that the SOIFGetter got.
|
getStatus | final public int getStatus()(Code) | | Return processing status.
|
run | public void run()(Code) | | Run the thread, get the SOIF.
|
setRDMHead | public void setRDMHead(String s)(Code) | | Not Supported. Set the RDM header.
See note in class definition.
Parameters: s - rdm header |
setStatus | final protected void setStatus(int i)(Code) | | Set processing status. If the current status is ABEND, it
will not be changed.
|
waitFor | public void waitFor()(Code) | | Wait for the getter to finish.
|
waitFor | public void waitFor(int max)(Code) | | Wait for the getter to finish.
Parameters: max - don't wait longer than max (increments are 100) |
|
|
|