Style Intelligence v12.0

inetsoft.sree.schedule
Class CompletionCondition

java.lang.Object
  extended by inetsoft.sree.schedule.CompletionCondition
All Implemented Interfaces:
inetsoft.sree.internal.HttpXMLSerializable, ScheduleCondition, inetsoft.util.XMLSerializable, Serializable

public class CompletionCondition
extends Object
implements ScheduleCondition, inetsoft.sree.internal.HttpXMLSerializable

Schedule condition to check if a specified task has completed.

See Also:
Serialized Form

Constructor Summary
CompletionCondition()
          Create an empty CompletionCondition.
CompletionCondition(String taskname)
          Create a CompletionCondition for specified task.
 
Method Summary
 String byteDecode(String encString)
          Convert the encoded string to the original unencoded string.
 String byteEncode(String source)
          Encode non-ascii characters to unicode enclosed in '[]'.
 boolean check(long time)
          Check the condition immediately before execution
 boolean equals(Object val)
           
 long getRetryTime(long time)
          Get the next time to retry the condition.
 String getTaskName()
           
 boolean isEncoding()
          Check if this object should encoded when writing.
 void parseXML(Element tag)
          Parse itself from an xml file.
 void setComplete(boolean complete)
          set the complete status.
 void setEncoding(boolean encoding)
          Set encoding flag.
 String toString()
           
 void writeXML(PrintWriter writer)
          Write itself to an xml file.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CompletionCondition

public CompletionCondition()
Create an empty CompletionCondition.


CompletionCondition

public CompletionCondition(String taskname)
Create a CompletionCondition for specified task.

Parameters:
taskname - the name of the task to check.
Method Detail

check

public boolean check(long time)
Check the condition immediately before execution

Specified by:
check in interface ScheduleCondition
Parameters:
time - current time.
Returns:
true if the condition is met.

setComplete

public void setComplete(boolean complete)
set the complete status.

Parameters:
complete - current time.

getRetryTime

public long getRetryTime(long time)
Get the next time to retry the condition. Complete Condition should not be retried. It waits for the depencyComplted to be set.

Specified by:
getRetryTime in interface ScheduleCondition
Parameters:
time - current time.
Returns:
the next time to retry. Negative value to stop retry.

getTaskName

public String getTaskName()

toString

public String toString()
Overrides:
toString in class Object

writeXML

public void writeXML(PrintWriter writer)
Write itself to an xml file.

Specified by:
writeXML in interface inetsoft.util.XMLSerializable

parseXML

public void parseXML(Element tag)
              throws Exception
Parse itself from an xml file.

Specified by:
parseXML in interface inetsoft.util.XMLSerializable
Throws:
Exception

equals

public boolean equals(Object val)
Overrides:
equals in class Object

byteEncode

public String byteEncode(String source)
Encode non-ascii characters to unicode enclosed in '[]'.

Specified by:
byteEncode in interface inetsoft.sree.internal.HttpXMLSerializable
Parameters:
source - source string.
Returns:
encoded string.

byteDecode

public String byteDecode(String encString)
Convert the encoded string to the original unencoded string.

Specified by:
byteDecode in interface inetsoft.sree.internal.HttpXMLSerializable
Parameters:
encString - a string encoded using the byteEncode method.
Returns:
original string.

isEncoding

public boolean isEncoding()
Check if this object should encoded when writing.

Specified by:
isEncoding in interface inetsoft.sree.internal.HttpXMLSerializable
Returns:
true if should encoded, false otherwise.

setEncoding

public void setEncoding(boolean encoding)
Set encoding flag.

Specified by:
setEncoding in interface inetsoft.sree.internal.HttpXMLSerializable
Parameters:
encoding - true to encode.

Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved.