class FetchAttachmentsProtocol : FetchDataProtocol<Attachment, ByteArray>Given a set of hashes either loads from from local storage or requests them from the other peer. Downloaded attachments are saved to local storage automatically.
| <init> |
FetchAttachmentsProtocol(requests: Set<SecureHash>, otherSide: Party)Given a set of hashes either loads from from local storage or requests them from the other peer. Downloaded attachments are saved to local storage automatically. |
| topic |
val topic: StringThe topic to use when communicating with other parties. If more than one topic is required then use sub-protocols. Note that this is temporary until protocol sessions are properly implemented. |
| otherSide |
val otherSide: Party |
| requests |
val requests: Set<SecureHash> |
| convert |
fun convert(wire: ByteArray): Attachment |
| load |
fun load(txid: SecureHash): Attachment? |
| maybeWriteToDisk |
fun maybeWriteToDisk(downloaded: List<Attachment>): Unit |
| call |
open fun call(): Result<T>This is where you fill out your business logic. |
| TOPIC |
const val TOPIC: String |