CallEvent
public class CallEvent : CommunicationEvent<CallEventData>
CallEvent provides a generic implementation for invoking remote operations.
-
Create a CallEvent instance for invoking a remote operation call with the given operation name, parameters (optional), and a context filter (optional).
Parameters must be by-name through a JSON object. If a context filter is specified, the given remote call is only executed if the filter conditions match a context object provided by the remote end.
Throws
if operation name is invalidDeclaration
Swift
public static func with(operation: String, parameters: [String: AnyCodable], filter: ContextFilter? = nil) throws -> CallEventParameters
operationa non-empty string containing the name of the operation to be invoked
parametersholds the parameter values to be used during the invocation of the operation (optional)
filtera context filter that must match a given context object at the remote end (optional)
Return Value
a Call event with the given parameters
-
Create a CallEvent instance for invoking a remote operation call with the given operation name, parameters (optional), and a context filter (optional).
Parameters must be by-position through a JSON array. If a context filter is specified, the given remote call is only executed if the filter conditions match a context object provided by the remote end.
Throws
if operation name is invalidDeclaration
Swift
public static func with(operation: String, parameters: [AnyCodable], filter: ContextFilter? = nil) throws -> CallEventParameters
operationa non-empty string containing the name of the operation to be invoked
parametersholds the parameter values to be used during the invocation of the operation (optional)
filtera context filter that must match a given context object at the remote end (optional)
Return Value
a Call event with the given parameters
-
Respond to a Call event with the given Return event.
Declaration
Swift
public func returned(returnEvent: ReturnEvent)Parameters
returnEventa Return event.
-
Undocumented
Declaration
Swift
public required init(from decoder: Decoder) throws -
Undocumented
Declaration
Swift
override public func encode(to encoder: Encoder) throws
View on GitHub
CallEvent Class Reference