ballerina/runtime package

Records Summary

Record 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.

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.

public type AuthContext

Represents the AuthenticationContext, populated with authenticated information.

Field Name Data Type Default Value Description
scheme string
authToken string

public type CallFailedException

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

public type CallStackElement

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

public type IllegalStateException

Field Name Data Type Default Value Description
message string
cause error

public type InvocationContext

Represents the InvocationContext.

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

public type NullReferenceException

Field Name Data Type Default Value Description
message string
cause error

public type 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