-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- started on websocket messaging
- Loading branch information
Showing
11 changed files
with
163 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
inception-scheduling/src/main/java/de/tudarmstadt/ukp/inception/scheduling/TaskState.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package de.tudarmstadt.ukp.inception.scheduling; | ||
|
||
public enum TaskState | ||
{ | ||
TRAINING_STARTED, TRAINING_FINISHED, SELECTION_STARTED, SELECTION_FINISHED | ||
} |
53 changes: 53 additions & 0 deletions
53
...ion-scheduling/src/main/java/de/tudarmstadt/ukp/inception/scheduling/TaskUpdateEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package de.tudarmstadt.ukp.inception.scheduling; | ||
|
||
|
||
public class TaskUpdateEvent | ||
{ | ||
private final String username; | ||
private final double progress; | ||
private final TaskState state; | ||
private final long recommenderId; | ||
private final boolean active; | ||
|
||
//TODO: add evaluationResult? | ||
|
||
public TaskUpdateEvent(String aName, TaskState aState, double aProgress, long aRecommenderId, | ||
boolean aActive) | ||
{ | ||
username = aName; | ||
state = aState; | ||
progress = aProgress; | ||
recommenderId = aRecommenderId; | ||
active = aActive; | ||
} | ||
|
||
public TaskUpdateEvent(String aUsername, TaskState aState, long aRecommenderId) | ||
{ | ||
this(aUsername, aState, 1, aRecommenderId, true); | ||
} | ||
|
||
public String getUsername() | ||
{ | ||
return username; | ||
} | ||
|
||
public double getProgress() | ||
{ | ||
return progress; | ||
} | ||
|
||
public TaskState getState() | ||
{ | ||
return state; | ||
} | ||
|
||
public long getRecommenderId() | ||
{ | ||
return recommenderId; | ||
} | ||
|
||
public boolean isActive() | ||
{ | ||
return active; | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
...uling/src/main/java/de/tudarmstadt/ukp/inception/scheduling/TaskWebSocketPushMessage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package de.tudarmstadt.ukp.inception.scheduling; | ||
|
||
import org.apache.wicket.protocol.ws.api.message.IWebSocketPushMessage; | ||
|
||
public class TaskWebSocketPushMessage | ||
implements IWebSocketPushMessage | ||
{ | ||
private static final long serialVersionUID = 1L; | ||
|
||
public TaskWebSocketPushMessage(double aProgress, TaskState aState, long aRecommenderId, | ||
boolean aActive) | ||
{ | ||
// TODO Auto-generated constructor stub | ||
} | ||
|
||
} |