CallEvent

public class CallEvent : CommunicationEvent<CallEventData>

CallEvent provides a generic implementation for invoking remote operations.

Static Factory Methods.

  • 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 invalid

    Declaration

    Swift

    public static func with(operation: String, parameters: [String: AnyCodable],
    
                            filter: ContextFilter? = nil) throws -> CallEvent

    Parameters

    operation

    a non-empty string containing the name of the operation to be invoked

    parameters

    holds the parameter values to be used during the invocation of the operation (optional)

    filter

    a 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 invalid

    Declaration

    Swift

    public static func with(operation: String, parameters: [AnyCodable],
    
                            filter: ContextFilter? = nil) throws -> CallEvent

    Parameters

    operation

    a non-empty string containing the name of the operation to be invoked

    parameters

    holds the parameter values to be used during the invocation of the operation (optional)

    filter

    a 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

    returnEvent

    a Return event.

Codable methods.

  • Undocumented

    Declaration

    Swift

    public required init(from decoder: Decoder) throws
  • Undocumented

    Declaration

    Swift

    override public func encode(to encoder: Encoder) throws