6 * Sample Judge Client Abstract Class, extends {@link JudgeClient}.
8 public class SampleJudgeClient
extends JudgeClient
{
10 * SampleJudgeClient constructor comment.
12 public SampleJudgeClient() {
17 * @see BaseClient#handleCheckedOutRun (RunInfoAndFiles) */
18 public void handleCheckedOutRun(RunInfoAndFiles run
) {}
21 * @see BaseClient#handleClarAnswered (ClarInfoAndFiles) */
22 public void handleClarAnswered(ClarInfoAndFiles clar
) {}
25 * @see BaseClient#handleClarSelected(ClarInfoAndFiles) */
26 public void handleClarSelected(ClarInfoAndFiles clar
) {}
28 * handleClientRefresh method comment.
30 public void handleClientRefresh() {}
32 * HandleJudgedRun method comment.
34 public void HandleJudgedRun(RunInfoAndFiles run
) {
36 String nl
= System
.getProperty("line.separator");
38 PC2Log
.message("HandleJudgedRun: "+
39 run
.getUserSiteId() + ":" + run
.getRunId() );
43 * @see BaseClient#handleNewClar(ClarInfoAndFiles) */
44 public void handleNewClar(ClarInfoAndFiles clar
)
49 * @see BaseClient#handleNewRun(RunInfoAndFiles) */
50 public void handleNewRun(RunInfoAndFiles run
)
54 * HandleNewRun method comment.
56 public void HandleNewRun(RunInfoAndFiles run
) {
57 String nl
= System
.getProperty("line.separator");
59 PC2Log
.message("HandleNewRun: "+
60 run
.getUserSiteId() + ":" + run
.getRunId() );
62 PC2Log
.message("handleNewRun: "+
64 nl
+ "site:id " + run
.toString() +
65 nl
+ "user id " + run
.getUserId() +
66 nl
+ "user name " + run
.getUserTitle() +
67 nl
+ "problem id " + run
.getProblemId() +
68 nl
+ "problem name " + run
.getProblemTitle() +
69 nl
+ "language id " + run
.getLanguageId() +
70 nl
+ "language name " + run
.getLanguageTitle() +
71 nl
+ "main file name " + run
.getMainFileName()
74 if (run
.getNumUserFiles() == 0)
75 PC2Log
.message("handleNewRun: There are no files");
78 PC2Log
.message("handleNewRun: There are "+run
.getNumUserFiles()+" files");
79 for (int i
= 0; i
< run
.getNumUserFiles();i
++)
81 String newfilename
= "Run"+run
.getRunId()+"."+run
.getUserFileName(i
);
82 PC2Log
.message("handleNewRun: File ["+i
+"] "+run
.getUserFileName(i
)+" written to: "+newfilename
);
84 run
.writeUserFile(i
, newfilename
);
85 } catch (Exception ex
)
87 System
.err
.println("Exception in handleNewRun "+ex
.getMessage());
96 * @see BaseClient#handleRunJudged (RunInfoAndFiles, boolean, String) */
97 public void handleRunJudged(RunInfoAndFiles run
, boolean isSolved
, java
.lang
.String judgement
) {}
100 * @see BaseClient#handleRunStatusUpdated (RunInfoAndFiles) */
101 public void handleRunStatusUpdated(RunInfoAndFiles run
) {}
104 * @see BaseClient#handleRunUpdated (RunInfoAndFiles) */
105 public void handleRunUpdated(RunInfoAndFiles run
) {}
107 * HandleSelectedRun method comment.
109 public void HandleSelectedRun(RunInfoAndFiles run
) {
111 String nl
= System
.getProperty("line.separator");
113 PC2Log
.message("HandleJudgedRun: "+
114 run
.getUserSiteId() + ":" + run
.getRunId() );
119 * @see BaseClient#handleSettingsUpdated() */
120 public void handleSettingsUpdated() {}
123 * @see BaseClient#handleUNCheckedOutRun (RunInfoAndFiles) */
124 public void handleUNCheckedOutRun(RunInfoAndFiles run
) {}