Package nl.stokpop.eventscheduler.api
Class CustomEvent
- java.lang.Object
-
- nl.stokpop.eventscheduler.api.CustomEvent
-
public class CustomEvent extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCustomEvent.ScheduleEventWrongFormat
-
Constructor Summary
Constructors Constructor Description CustomEvent(java.time.Duration duration, java.lang.String name, java.lang.String description)CustomEvent(java.time.Duration duration, java.lang.String name, java.lang.String description, java.lang.String settings)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CustomEventcreateFromLine(java.lang.String line)Use this format: duration|event-name(description)|settings Note: description and settings are optional.java.lang.StringgetDescription()java.time.DurationgetDuration()java.lang.StringgetName()java.lang.StringgetNameDescription()java.lang.StringgetSettings()java.lang.StringtoString()
-
-
-
Method Detail
-
getDuration
public java.time.Duration getDuration()
-
getName
public java.lang.String getName()
-
getNameDescription
public java.lang.String getNameDescription()
-
getSettings
public java.lang.String getSettings()
-
createFromLine
public static CustomEvent createFromLine(java.lang.String line)
Use this format: duration|event-name(description)|settings Note: description and settings are optional. duration is in ISO-8601 format. The duration is the time from the start of the test until the event to fire. Examples:- PT1M|change-backend-delay|delay=PT2S
- PT5M|change-backend-delay(set to extreme delay to test timeouts)|delay=PT10M
- Parameters:
line- line that is separated by duration|event-name(description)|settings- Returns:
- new ScheduleEvent
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getDescription
public java.lang.String getDescription()
-
-