SASServer

public protocol SASServer : AnyObject

Public Interface to a SAS Server.

Instances are acquired by calling SASManager.verifySASServer() or by calling SASManager.servers(). When a server is acquired by the SASManager API, it is retained, and made available across program instances.

You can remove a SAS server by calling SASManager.removeSASServer().

Since

since 8.22
  • the descriptor for this server.

    Since

    since 8.33

    Declaration

    Swift

    var descriptor: SASServerDescriptor { get set }
  • url

    The URL of this server.

    Since

    since 8.22

    Declaration

    Swift

    @available(*, deprecated: 8.33)
    var url: URL? { get set }
  • Userid of the connection to this server. Can be nil if this server is connected as the guest user

    Since

    since 8.22

    Declaration

    Swift

    @available(*, deprecated: 8.33)
    var userid: String? { get set }
  • The users password. Can be nil if connected as the guest user.

    Since

    since 8.22

    Declaration

    Swift

    @available(*, deprecated: 8.33)
    var password: String? { get set }
  • Indicates if this server connected as guest.

    Since

    since 8.22

    Declaration

    Swift

    @available(*, deprecated: 8.33)
    var guestMode: Bool { get set }
  • Readable description of this server. A default description will be generated if one is not supplied.

    Since

    since 8.22

    Declaration

    Swift

    var description: String { get set }
  • Indicates if this connection secure. secure is https (by default, port 443)

    Since

    since 8.22

    Declaration

    Swift

    @available(*, deprecated: 8.33)
    var secure: Bool { get set }
  • Indicates if the SASServer automatically generates section previews for this report.

    Since

    since 8.22
  • deprecated in 8.3 Thumbnails are always generated. This field no longer has any effect.
  • Declaration

    Swift

    @available(*, deprecated: 8.3)
    var generatesReportThumbnails: Bool { get set }
  • Connect to this server.

    Since

    since 8.22

    Declaration

    Swift

    func connect(_ completion : @escaping (_ error : NSError?) -> Void)

    Parameters

    completion

    Completion block for the connection. The error will be nil if the connection is successful.

    Return Value

    N/A

  • Get available reports.

    Since

    since 8.22

    Declaration

    Swift

    var subscribedReports: [SASReport] { get }

    Return Value

    Array of reports

  • Get a report from its descriptor

    Since

    since 8.22

    Declaration

    Swift

    func getSubscribedReport(descriptor: SASReportDescriptor) -> SASReport?

    Parameters

    uniqueIdentifier

    identifier for this report.

    Return Value

    report (nil if descriptor is invalid)

  • Subscribes to a report from the server.

    Since

    since 8.22

    Declaration

    Swift

    func subscribe( descriptor: SASReportDescriptor, completion : @escaping (_ report : SASReport?, _ error : NSError?) -> Void)

    Parameters

    descriptor

    Descriptor for report.

    completion

    Callback for completion. either report or error will be nil.

  • Remove subscription to a report.

    Since

    since 8.22

    Declaration

    Swift

    func unsubscribe(descriptor: SASReportDescriptor)

    Parameters

    descriptor

    Descriptor for report.