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.security.SaslOutcome; 14 15 16 17 import hunt.proton.amqp.Binary; 18 import hunt.proton.amqp.security.SaslFrameBody; 19 import hunt.proton.amqp.security.SaslCode; 20 import hunt.logging; 21 22 class SaslOutcome : SaslFrameBody 23 { 24 25 private SaslCode _code; 26 private Binary _additionalData; 27 28 public SaslCode getCode() 29 { 30 return _code; 31 } 32 33 public void setCode(SaslCode code) 34 { 35 if( code is null ) 36 { 37 logError("the code field is mandatory"); 38 } 39 40 _code = code; 41 } 42 43 public Binary getAdditionalData() 44 { 45 return _additionalData; 46 } 47 48 public void setAdditionalData(Binary additionalData) 49 { 50 _additionalData = additionalData; 51 } 52 53 54 public void invoke(E)(SaslFrameBodyHandler!E handler, Binary payload, E context) 55 { 56 handler.handleOutcome(this, payload, context); 57 } 58 59 60 61 }