Service Runtime

from runtime import Runtime

Port NameLocationProtocolInterfaces
iplocalRuntimeInterface

List of Available Interfaces

RuntimeInterface

Operation NameInput TypeOutput TypeFaultsDescription
callExitanyvoid-Stops gracefully the execution of this service.
Calling this operation is equivalent to invoking the exit statement.
dumpStatevoidstring-Returns a pretty-printed string representation of
the local state of the invoking Jolie process and
the global state of this service.
getIncludePathsvoidGetIncludePathResponse-Get the include paths used by this interpreter
getLocalLocationvoidany-Get the local in-memory location of this service.
getOutputPortGetOutputPortRequestGetOutputPortResponse
OutputPortDoesNotExistundefined
Returns the definition of output port definition.
@throws OutputPortDoesNotExist if the requested output port does not exist.
getOutputPortsvoidGetOutputPortsResponse-Returns all the output ports used by this service.
getProcessIdvoidstring-Returns the internal identifier of the executing Jolie process.
getRedirectionGetRedirectionRequestMaybeString-Get the output port name that a redirection points to.
getVersionvoidstring-Returns the version of the Jolie interpreter running this service.
getenvstringMaybeString-Returns the value of an environment variable.
haltHaltRequestvoid-Halts non-gracefully the execution of this service.
loadEmbeddedServiceLoadEmbeddedServiceRequestany
RuntimeExceptionRuntimeExceptionType
Load an embedded service.
loadLibrarystringvoid
IOException4#IOExceptionType
Dynamically loads an external (jar) library.
removeOutputPortstringvoid-Removes the output port with the requested name.
removeRedirectionGetRedirectionRequestvoid
RuntimeExceptionRuntimeExceptionType
Remove a redirection at an input port
setMonitorSetMonitorRequestvoid-Set the monitor for this service.
setOutputPortSetOutputPortRequestvoid-Set an output port.
If an output port with this name does not exist already,
this operation creates it.
Otherwise, the output port is replaced with this one.
setRedirectionSetRedirectionRequestvoid
RuntimeExceptionRuntimeExceptionType
Set a redirection at an input port.
If the redirection with this name does not exist already,
this operation creates it.
Otherwise, the redirection is replaced with this one.
statsvoidStats-Returns information on the runtime state of the VM.

Types

GetIncludePathResponse:
Type Declaration
void {
  path[0,1]: string //  The include paths of the interpreter
}
GetOutputPortRequest:
Type Declaration
void {
  name[1,1]: string //  The name of the output port
}
GetOutputPortResponse:
Type Declaration
void {
  protocol[1,1]: string //  The protocol name of the output port
  name[1,1]: string //  The name of the output port
  location[1,1]: string //  The location of the output port
}
GetOutputPortsResponse:
Type Declaration
void {
  port[0,1]: void {
    protocol[1,1]: string //  The protocol name of the output port
    name[1,1]: string //  The name of the output port
    location[1,1]: string //  The location of the output port
  } //  The output ports used by this interpreter
}
GetRedirectionRequest:
Type Declaration
void {
  inputPortName[1,1]: string //  The target input port
  resourceName[1,1]: string //  The resource name of the redirection to get
}
HaltRequest:
Type Declaration
void {
  status[0,1]: int //  The status code to return to the execution environment
}
IOExceptionType:
Type Declaration
JavaExceptionType
IOExceptionType:
Type Declaration
IOExceptionType
JavaExceptionType:
Type Declaration
string {
  stackTrace[1,1]: string // 
}
LoadEmbeddedServiceRequest:
Type Declaration
void {
  filepath[1,1]: string //  The path to the service to load
  service[0,1]: string //  The name of the service to load, if relevant
  type[0,1]: string //  The type of the service, e.g., Jolie, Java, or JavaScript. Default: Jolie
  params[0,1]: undefined //  The actual parameters (arguments) that should be passed to the service
}
|void {
  code[1,1]: string // 
}

MaybeString:
Type Declaration
void
|string

RuntimeExceptionType:
Type Declaration
JavaExceptionType
SetMonitorRequest:
Type Declaration
void {
  protocol[0,1]: string //  The protocol configuration for the monitor
  location[1,1]: any //  The location of the monitor
}
SetOutputPortRequest:
Type Declaration
void {
  protocol[0,1]: string //  The name of the protocol (e.g., sodep, http)
  name[1,1]: string //  The name of the output port
  location[1,1]: any //  The location of the output port
}
SetRedirectionRequest:
Type Declaration
void {
  inputPortName[1,1]: string //  The target input port
  outputPortName[1,1]: string //  The target output port
  resourceName[1,1]: string //  The target resource name
}
Stats: Information on the interpreter execution so far
Type Declaration
void {
  memory[1,1]: void {
    total[1,1]: long // 
    used[1,1]: long // 
    free[1,1]: long // 
  } // 
  os[1,1]: void {
    availableProcessors[1,1]: int //  Number of available processors
    systemLoadAverage[1,1]: double //  System load average
    name[1,1]: string //  Name of the OS
    arch[1,1]: string //  Architecture
    version[1,1]: string //  OS version
  } //  OS-related information
  files[1,1]: void {
    openCount[0,1]: long //  Number of open files
    maxCount[0,1]: long //  Maximum number of open files allowed for this VM
  } //  Information on file descriptors
}