1 /* 2 * hunt-proton: AMQP Protocol library for D programming language. 3 * 4 * Copyright (C) 2018-2019 HuntLabs 5 * 6 * Website: https://www.huntlabs.net/ 7 * 8 * Licensed under the Apache-2.0 License. 9 * 10 */ 11 12 13 module hunt.proton.amqp.transaction.Declared; 14 15 import hunt.proton.amqp.Binary; 16 import hunt.proton.amqp.Symbol; 17 import hunt.proton.amqp.messaging.Outcome; 18 import hunt.proton.amqp.transport.DeliveryState; 19 import hunt.logging; 20 21 import std.concurrency : initOnce; 22 23 class Declared : DeliveryState, Outcome 24 { 25 // public static Symbol DESCRIPTOR_SYMBOL = Symbol.valueOf("amqp:declared:list"); 26 27 28 static Symbol DESCRIPTOR_SYMBOL() 29 { 30 __gshared Symbol inst; 31 return initOnce!inst(Symbol.valueOf("amqp:declared:list")); 32 } 33 34 35 36 private Binary _txnId; 37 38 public Binary getTxnId() 39 { 40 return _txnId; 41 } 42 43 public void setTxnId(Binary txnId) 44 { 45 if( txnId is null ) 46 { 47 logError("the txn-id field is mandatory"); 48 } 49 50 _txnId = txnId; 51 } 52 53 54 override 55 public DeliveryStateType getType() { 56 return DeliveryStateType.Declared; 57 } 58 }