IntdashClientUpstreamManagerDelegate
@objc
public protocol IntdashClientUpstreamManagerDelegate : NSObjectProtocol
UpstreamManager に追加するDelegateを表すプロトコル。
-
セクションの送信後、送信されたセクションのACKを受信したときなどに呼び出されるコールバックです。
返却された success が false の場合には、以下の可能性があります。
- 送信したセクションがサーバーで正常に処理されなかった
- 送信したセクションのACKが所定の時間内に返却されなかった(タイムアウトした)
タイムアウトによってこのコールバックが呼び出された後にサーバーからACKを受信した場合には、再度同じセクションIDでこのコールバックが呼び出される可能性があります。
Declaration
Swift
func upstreamManager(_ manager: IntdashClient.UpstreamManager, didReceiveEndOfSection sectionId: Int, streamId: Int, success: Bool, final: Bool, sentCount: Int)Parameters
managerアップストリームマネージャ
sectionIdセクションのセクションID
streamIdセクションが所属するストリームのストリームID
successサーバーでのセクションの処理結果
final最後のセクションか
sentCount送信されたセクションの数
-
upstreamManager(_:didGeneratedSesion: sectionIndex: streamId: final: sentCount: startOfElapsedTime: endOfElapsedTime: ) セクションの送信前、送信するセクションが生成されたときに呼び出されるコールバックです。
セクションはある特定のひとつの計測に紐づき、セクションが生成されたときに割り当てられる
sectionIdは、紐付いた計測内で一意の値となります。sectionIndexは、sectionIdとは別に、セクションの管理をしやすくするために、ストリームごとに一意かつ連続的な値として割り振られるインデックスです。sectionIdおよびsectionIndexは、IntdashClient.UpstreamManager.openForResend(measurementId:srcEdgeId:dstEdgeIds:sectionUpdateInterval:resendSections:lastSectionId:)にてセクションの再送時に使用します。Declaration
Swift
@objc optional func upstreamManager(_ manager: IntdashClient.UpstreamManager, didGeneratedSesion sectionId: Int, sectionIndex: Int, streamId: Int, final: Bool, sentCount: Int, startOfElapsedTime: TimeInterval, endOfElapsedTime: TimeInterval)Parameters
managerアップストリームマネージャ
sectionIdセクションのセクションID(計測ごとに一意に割り振られたID)
sectionIndexストリームごとに連続かつ一意なインデックス値
streamIdセクションが所属するストリームのストリームID
final最後のセクションか
sentCount送信されたセクションの数
startOfElapsedTimeセクションの最初のUnitの経過時間
endOfElapsedTimeセクションの最後のUnitの経過時間
-
計測の払い出しの要求が受け入れられ、計測が払い出されたときに呼び出されるコールバックです。
Declaration
Swift
@objc optional func upstreamManager(_ manager: IntdashClient.UpstreamManager, didReceiveMeasurementId measurementId: String)Parameters
managerアップストリームマネージャ
measurementId払い出された計測のUUID
-
計測の払い出しの要求が受け入れらずに失敗したときに呼び出されるコールバックです。
Declaration
Swift
@objc optional func upstreamManager(_ manager: IntdashClient.UpstreamManager, didFailToReceiveMeasurementIdWith error: Error)Parameters
managerアップストリームマネージャ
error発生したエラー
-
データが送信されたときに呼び出されるコールバックです。
Declaration
Swift
@objc optional func upstreamManager(_ manager: IntdashClient.UpstreamManager, didSendElem dataSize: Int)Parameters
managerアップストリームマネージャ
dataSize送信したデータのデータサイズ
IntdashClientUpstreamManagerDelegate Protocol Reference