ballerina/runtime package
Records Summary
Record | Description | ||
---|---|---|---|
AuthContext | Represents the AuthenticationContext, populated with authenticated information. |
||
CallFailedException | Representation of |
||
CallStackElement | Representation of |
||
IllegalStateException | Representation of |
||
InvocationContext | Represents the InvocationContext. |
||
NullReferenceException | Representation of |
||
UserPrincipal | Represents the UserPrincipal, populated with authenticated user information. |
Functions Summary
Return Type | Function and Description | ||
---|---|---|---|
CallStackElement[] | getCallStack() Retrieves the Call Stack |
||
CallStackElement | getErrorCallStackFrame(error? e) Retrieves the Call Stack Frame for a particular error |
||
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
Representation of CallFailedException
Field Name | Data Type | Default Value | Description |
---|---|---|---|
message | string | Error message |
|
cause | error? | optional |
|
causes | error[]? | optional array of |
public type CallStackElement
Representation of CallStackElement
Field Name | Data Type | Default Value | Description |
---|---|---|---|
callableName | string | Callable name |
|
packageName | string | Package name |
|
fileName | string | File name |
|
lineNumber | int | Line number |
public type IllegalStateException
Representation of IllegalStateException
Field Name | Data Type | Default Value | Description |
---|---|---|---|
message | string | error message |
|
cause | error? | optional error cause |
public type InvocationContext
Represents the InvocationContext.
Field Name | Data Type | Default Value | Description |
---|---|---|---|
id | string | ||
userPrincipal | runtime:UserPrincipal | ||
authContext | runtime:AuthContext |
public type NullReferenceException
Representation of NullReferenceException
Field Name | Data Type | Default Value | Description |
---|---|---|---|
message | string | error message |
|
cause | error? | optional error cause |
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[])
Retrieves the Call Stack
Return Type | Description | ||
---|---|---|---|
CallStackElement[] | Array of |
public function getErrorCallStackFrame(error? e) returns (CallStackElement)
Retrieves the Call Stack Frame for a particular error
Parameter Name | Data Type | Default Value | Description |
---|---|---|---|
e | error? | optional |
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 |