Time

Last updated 9 months ago

Inclusion code:

Service Deployment

Port Name

Location

Protocol

Interfaces

Time

-

-

TimeInterface

List of Available Interfaces

TimeInterface

Operation Name

Input Type

Output Type

Faults

scheduleTimeout

ScheduleTimeOutRequest

long

InvalidTimeUnit( undefined )

getDateValues

DateValuesRequestType

DateValuesType

InvalidDate( undefined )

getDateTime

GetDateTimeRequest

GetDateTimeResponse

getCurrentTimeMillis

void

long

getDateDiff

DiffDateRequestType

int

getTimeDiff

GetTimeDiffRequest

int

getTimestampFromString

GetTimestampFromStringRequest

long

InvalidTimestamp( undefined )

cancelTimeout

long

bool

setNextTimeoutByTime

undefined

-

getCurrentDateTime

CurrentDateTimeRequestType

string

sleep

undefined

undefined

setNextTimeout

SetNextTimeOutRequest

-

getTimeFromMilliSeconds

int

TimeValuesType

getDateTimeValues

GetTimestampFromStringRequest

DateTimeType

InvalidDate( undefined )

setNextTimeoutByDateTime

undefined

-

getCurrentDateValues

void

DateValuesType

getTimeValues

string

TimeValuesType

Operation Description

scheduleTimeout

Operation documentation: Schedules a timeout, which can be cancelled using #cancelTimeout from the returned string. Default .timeunit value is MILLISECONDS, .operation default is "timeout".

Invocation template:

scheduleTimeout@Time( request )( response )

Request type

Type: ScheduleTimeOutRequest

Type documentation: no documentation provided

type ScheduleTimeOutRequest: int {
.message?: undefined
.operation?: string
.timeunit?: string
}

Response type

Type: long

Type documentation: no documentation provided

Possible faults thrown

Fault InvalidTimeUnit with type undefined

Fault-handling install template:

install ( InvalidTimeUnit => /* error-handling code */ )

getDateValues

Operation documentation: Converts an input string into a date expressed by means of three elements: day, month and year. The request may specify the date parsing format. See #DateValuesRequestType for details.

Invocation template:

getDateValues@Time( request )( response )

Request type

Type: DateValuesRequestType

Type documentation: no documentation provided

type DateValuesRequestType: string {
.format?: string
}

Response type

Type: DateValuesType

Type documentation: no documentation provided

type DateValuesType: void {
.month: int
.year: int
.day: int
}

Possible faults thrown

Fault InvalidDate with type undefined

Fault-handling install template:

install ( InvalidDate => /* error-handling code */ )

getDateTime

Operation documentation: It returns a date time in a string format starting from a timestamp

Invocation template:

getDateTime@Time( request )( response )

Request type

Type: GetDateTimeRequest

Type documentation: no documentation provided

type GetDateTimeRequest: long {
.format?: string
}

Response type

Type: GetDateTimeResponse

Type documentation: no documentation provided

type GetDateTimeResponse: string {
.month: int
.hour: int
.year: int
.day: int
.minute: int
.second: int
}

getCurrentTimeMillis

Operation documentation: Warning: this is temporary and subject to future change as soon as long is supported by Jolie.

Invocation template:

getCurrentTimeMillis@Time( request )( response )

Request type

Type: void

Type documentation: no documentation provided

Response type

Type: long

Type documentation: no documentation provided

getDateDiff

Invocation template:

getDateDiff@Time( request )( response )

Request type

Type: DiffDateRequestType

Type documentation: no documentation provided

type DiffDateRequestType: void {
.format?: string
.date2: string
.date1: string
}

Response type

Type: int

Type documentation: no documentation provided

getTimeDiff

Invocation template:

getTimeDiff@Time( request )( response )

Request type

Type: GetTimeDiffRequest

Type documentation: no documentation provided

type GetTimeDiffRequest: void {
.time1: string
.time2: string
}

Response type

Type: int

Type documentation: no documentation provided

getTimestampFromString

Invocation template:

getTimestampFromString@Time( request )( response )

Request type

Type: GetTimestampFromStringRequest

Type documentation: no documentation provided

type GetTimestampFromStringRequest: string {
.format?: string
.language?: string
}

Response type

Type: long

Type documentation: no documentation provided

Possible faults thrown

Fault InvalidTimestamp with type undefined

Fault-handling install template:

install ( InvalidTimestamp => /* error-handling code */ )

cancelTimeout

Operation documentation: Cancels a timeout from a long-value created from #scheduleTimeout

Invocation template:

cancelTimeout@Time( request )( response )

Request type

Type: long

Type documentation: no documentation provided

Response type

Type: bool

Type documentation: no documentation provided

setNextTimeoutByTime

Invocation template:

setNextTimeoutByTime@Time( request )

Request type

Type: undefined

Type documentation: no documentation provided

getCurrentDateTime

Invocation template:

getCurrentDateTime@Time( request )( response )

Request type

Type: CurrentDateTimeRequestType

Type documentation: no documentation provided

type CurrentDateTimeRequestType: void {
.format?: string
}

Response type

Type: string

Type documentation: no documentation provided

sleep

Invocation template:

sleep@Time( request )( response )

Request type

Type: undefined

Type documentation: no documentation provided

Response type

Type: undefined

Type documentation: no documentation provided

setNextTimeout

Operation documentation: it sets a timeout whose duration is in milliseconds and it is represented by the root value of the message When the alarm is triggered a message whose content is defined in .message is sent to operation defined in .operation ( default: timeout )

Invocation template:

setNextTimeout@Time( request )

Request type

Type: SetNextTimeOutRequest

Type documentation: no documentation provided

type SetNextTimeOutRequest: int {
.message?: undefined
.operation?: string
}

getTimeFromMilliSeconds

Invocation template:

getTimeFromMilliSeconds@Time( request )( response )

Request type

Type: int

Type documentation: no documentation provided

Response type

Type: TimeValuesType

Type documentation: no documentation provided

type TimeValuesType: void {
.hour: int
.minute: int
.second: int
}

getDateTimeValues

Invocation template:

getDateTimeValues@Time( request )( response )

Request type

Type: GetTimestampFromStringRequest

Type documentation: no documentation provided

type GetTimestampFromStringRequest: string {
.format?: string
.language?: string
}

Response type

Type: DateTimeType

Type documentation: no documentation provided

type DateTimeType: void {
.month: int
.hour: int
.year: int
.day: int
.minute: int
.second: int
}

Possible faults thrown

Fault InvalidDate with type undefined

Fault-handling install template:

install ( InvalidDate => /* error-handling code */ )

setNextTimeoutByDateTime

Invocation template:

setNextTimeoutByDateTime@Time( request )

Request type

Type: undefined

Type documentation: no documentation provided

getCurrentDateValues

Operation documentation: Returns the current date split in three fields: day, month and year

Invocation template:

getCurrentDateValues@Time( request )( response )

Request type

Type: void

Type documentation: no documentation provided

Response type

Type: DateValuesType

Type documentation: no documentation provided

type DateValuesType: void {
.month: int
.year: int
.day: int
}

getTimeValues

Invocation template:

getTimeValues@Time( request )( response )

Request type

Type: string

Type documentation: no documentation provided

Response type

Type: TimeValuesType

Type documentation: no documentation provided

type TimeValuesType: void {
.hour: int
.minute: int
.second: int
}