Time

Inclusion code:

Service Deployment
Port Name Location Protocol Interfaces
Time documentation:
Time - - TimeInterface

List of Available Interfaces

TimeInterface

Interface documentation:

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 ScheduleTimeOutRequest: int {
    .message?: undefined
    .operation?: string
    .timeunit?: string
}

ScheduleTimeOutRequest : int

  • message : any
  • operation : string
  • timeunit : string

Response type

Type: long

long : long

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 DateValuesRequestType: string {
    .format?: string
}

DateValuesRequestType : string

  • format : string

Response type

Type: DateValuesType

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

DateValuesType : void : WARNING: work in progress, the API is unstable.

  • 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 GetDateTimeRequest: long {
    .format?: string
}

GetDateTimeRequest : long

  • format : string

Response type

Type: GetDateTimeResponse

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

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

void : void

Response type

Type: long

long : long

getDateDiff

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

Invocation template:

getDateDiff@Time( request )( response )

Request type

Type: DiffDateRequestType

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

DiffDateRequestType : void

  • format : string
  • date2 : string
  • date1 : string

Response type

Type: int

int : int

getTimeDiff

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

Invocation template:

getTimeDiff@Time( request )( response )

Request type

Type: GetTimeDiffRequest

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

GetTimeDiffRequest : void

  • time1 : string
  • time2 : string

Response type

Type: int

int : int

getTimestampFromString

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

Invocation template:

getTimestampFromString@Time( request )( response )

Request type

Type: GetTimestampFromStringRequest

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

GetTimestampFromStringRequest : string

  • format : string
  • language : string

Response type

Type: long

long : long

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

long : long

Response type

Type: bool

bool : bool

setNextTimeoutByTime

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:

setNextTimeoutByTime@Time( request )

Request type

Type: undefined

undefined : any

getCurrentDateTime

Operation documentation:

Invocation template:

getCurrentDateTime@Time( request )( response )

Request type

Type: CurrentDateTimeRequestType

type CurrentDateTimeRequestType: void {
    .format?: string
}

CurrentDateTimeRequestType : void

  • format : string

Response type

Type: string

string : string

sleep

Operation documentation:

Invocation template:

sleep@Time( request )( response )

Request type

Type: undefined

undefined : any

Response type

Type: undefined

undefined : any

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 SetNextTimeOutRequest: int {
    .message?: undefined
    .operation?: string
}

SetNextTimeOutRequest : int

  • message : any
  • operation : string

getTimeFromMilliSeconds

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

Invocation template:

getTimeFromMilliSeconds@Time( request )( response )

Request type

Type: int

int : int

Response type

Type: TimeValuesType

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

TimeValuesType : void

  • hour : int
  • minute : int
  • second : int

getDateTimeValues

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

Invocation template:

getDateTimeValues@Time( request )( response )

Request type

Type: GetTimestampFromStringRequest

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

GetTimestampFromStringRequest : string

  • format : string
  • language : string

Response type

Type: DateTimeType

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

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

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:

setNextTimeoutByDateTime@Time( request )

Request type

Type: undefined

undefined : any

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

void : void

Response type

Type: DateValuesType

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

DateValuesType : void : WARNING: work in progress, the API is unstable.

  • month : int
  • year : int
  • day : int

getTimeValues

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

Invocation template:

getTimeValues@Time( request )( response )

Request type

Type: string

string : string

Response type

Type: TimeValuesType

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

TimeValuesType : void

  • hour : int
  • minute : int
  • second : int

results matching ""

    No results matching ""