ballerina/runtime package

Primitives Summary

Type Description

Type Definitions

Type Values Description

Annotations

Name Attachement Points Data Type Description

Objects Summary

Object Description
AuthContext
Represents the AuthenticationContext, populated with authenticated information.
CallFailedException
CallStackElement
IllegalStateException
InvocationContext
Represents the InvocationContext.
NullReferenceException
UserPrincipal
Represents the UserPrincipal, populated with authenticated user information.

Endpoints Summary

Endpoint Description

Functions Summary

Return Type Function and Description
CallStackElement[] getCallStack()
CallStackElement getErrorCallStackFrame(error e)
InvocationContext getInvocationContext()
Creates a InvocationContext instance.
string getProperty(string name)
Returns the value associated with the specified property name.
sleep(int millis)
Halts the current worker for a predefined amount of time.

Global Variables

Name Data Type Description

public object AuthContext

Represents the AuthenticationContext, populated with authenticated information.

Field Name Data Type Default Value Description
scheme string
authToken string

public object CallFailedException

Field Name Data Type Default Value Description
message string
cause error
causes error[]

public object CallStackElement

Field Name Data Type Default Value Description
callableName string
packageName string
fileName string
lineNumber int

public object IllegalStateException

Field Name Data Type Default Value Description
message string
cause error

public object InvocationContext

Represents the InvocationContext.

Field Name Data Type Default Value Description
id string
userPrincipal UserPrincipal
authContext AuthContext

public object NullReferenceException

Field Name Data Type Default Value Description
message string
cause error

public object UserPrincipal

Represents the UserPrincipal, populated with authenticated user information.

Field Name Data Type Default Value Description
userId string
username string
claims map
scopes string[]

public function getCallStack() returns (CallStackElement[])

Return Type Description
CallStackElement[]

public function getErrorCallStackFrame(error e) returns (CallStackElement)

Parameter Name Data Type Default Value Description
e error
Return Type Description
CallStackElement

public function getInvocationContext() returns (InvocationContext)

Creates a InvocationContext instance.

Return Type Description
InvocationContext

InvocationContext instance

public function getProperty(string name) returns (string)

Returns the value associated with the specified property name.

Parameter Name Data Type Default Value Description
name string

Name of the property

Return Type Description
string

Value of the property if the property exists, an empty string otherwise

public function sleep(int millis)

Halts the current worker for a predefined amount of time.

Parameter Name Data Type Default Value Description
millis int

Amount of time to sleep in milliseconds