home *** CD-ROM | disk | FTP | other *** search
- import stardiv.tools.SjProtocolWindow;
-
- class SJCondMsgStruct implements SJCondition {
- private boolean bMessagePending;
- private SJMessageHandlerInterface aOwner;
- private SJMessageHandlerInterface aDestination;
- private SJMessage aMessage;
- public SJCondition[] aCondEventArray;
-
- public final void SetOwner(SJMessageHandlerInterface var1) {
- this.aOwner = var1;
- }
-
- public final SJMessageHandlerInterface GetOwner() {
- return this.aOwner;
- }
-
- public final void SetDestination(SJMessageHandlerInterface var1) {
- this.aDestination = var1;
- }
-
- public final SJMessageHandlerInterface GetDestination() {
- return this.aDestination;
- }
-
- public final void SetMessage(SJMessage var1) {
- this.aMessage = var1;
- }
-
- public final SJMessage GetMessage() {
- return this.aMessage;
- }
-
- protected private SJCondMsgStruct(SJMessageHandlerInterface var1) {
- this.aOwner = var1;
- this.aDestination = null;
- this.aMessage = null;
- this.aCondEventArray = null;
- this.bMessagePending = false;
- }
-
- public synchronized boolean IsTrue() {
- return false;
- }
-
- public synchronized boolean AllConditionsTrue() {
- if (this.aCondEventArray != null) {
- for(int var1 = 0; var1 < this.aCondEventArray.length; ++var1) {
- if (!this.aCondEventArray[var1].IsTrue()) {
- return false;
- }
- }
- }
-
- return true;
- }
-
- public void Deliver() {
- if (this.aDestination != null) {
- this.aDestination.HandleMessage(this.aMessage);
- }
-
- }
-
- public final synchronized boolean PeekMessagePending() {
- return this.bMessagePending;
- }
-
- protected private final synchronized void SetMessagePending() {
- this.bMessagePending = true;
- SjProtocolWindow.AddNotifyEvent(this, "SJJob.SetMessagePending()");
- this.notifyAll();
- SjProtocolWindow.AddNotifyEventDONE(this, "SJJob.SetMessagePending()");
- }
- }
-