MessageEndpointListener
public class MessageEndpointListener
ENTERPRISE EDITION ONLY.
The listener for incoming message endpoint connections.
-
Initializes the MessageEndpointListener object with the given configuration.
Declaration
Swift
public init(config: MessageEndpointListenerConfiguration)Parameters
configThe configuration object.
-
Accepts the incoming message endpoint connection.
Declaration
Swift
public var connections: Array<MessageEndpointConnection> { get } -
Accepts the incoming message endpoint connection.
Declaration
Swift
public func accept(connection: MessageEndpointConnection)Parameters
connectionThe MessageEndpointConnection object.
-
Closes the given message endpoint connection.
Declaration
Swift
public func close(connection: MessageEndpointConnection)Parameters
connectionThe MessageEndpointConnection object.
-
Close all active connections.
Declaration
Swift
public func closeAll() -
Adds a change listener. Changes will be posted on the main queue.
Declaration
Swift
@discardableResult public func addChangeListener( _ listener: @escaping (MessageEndpointListenerChange) -> Void) -> ListenerTokenParameters
listenerThe listener to post the changes.
Return Value
An opaque listener token object for removing the listener.
-
Adds a change listener with the dispatch queue on which changes will be posted. If the dispatch queue is not specified, the changes will be posted on the main queue.
Declaration
Swift
@discardableResult public func addChangeListener(withQueue queue: DispatchQueue?, _ listener: @escaping (MessageEndpointListenerChange) -> Void) -> ListenerTokenParameters
queueThe dispatch queue.
listenerThe listener to post changes.
Return Value
An opaque listener token object for removing the listener.
-
Removes a change listener with the given listener token.
Declaration
Swift
public func removeChangeListener(token: ListenerToken)Parameters
tokenThe listener token.
MessageEndpointListener Class Reference