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.transport.AmqpError; 14 15 import hunt.proton.amqp.Symbol; 16 17 import std.concurrency : initOnce; 18 19 interface AmqpError 20 { 21 22 static Symbol INTERNAL_ERROR() { 23 __gshared Symbol inst; 24 return initOnce!inst(Symbol.valueOf("amqp:internal-error")); 25 } 26 27 static Symbol NOT_FOUND() { 28 __gshared Symbol inst; 29 return initOnce!inst(Symbol.valueOf("amqp:not-found")); 30 } 31 32 static Symbol UNAUTHORIZED_ACCESS() { 33 __gshared Symbol inst; 34 return initOnce!inst(Symbol.valueOf("amqp:unauthorized-access")); 35 } 36 37 static Symbol DECODE_ERROR() { 38 __gshared Symbol inst; 39 return initOnce!inst(Symbol.valueOf("amqp:decode-error")); 40 } 41 42 static Symbol RESOURCE_LIMIT_EXCEEDED() { 43 __gshared Symbol inst; 44 return initOnce!inst(Symbol.valueOf("amqp:resource-limit-exceeded")); 45 } 46 47 static Symbol NOT_ALLOWED() { 48 __gshared Symbol inst; 49 return initOnce!inst(Symbol.valueOf("amqp:not-allowed")); 50 } 51 52 static Symbol INVALID_FIELD() { 53 __gshared Symbol inst; 54 return initOnce!inst(Symbol.valueOf("amqp:invalid-field")); 55 } 56 57 static Symbol NOT_IMPLEMENTED() { 58 __gshared Symbol inst; 59 return initOnce!inst(Symbol.valueOf("amqp:not-implemented")); 60 } 61 62 static Symbol RESOURCE_LOCKED() { 63 __gshared Symbol inst; 64 return initOnce!inst(Symbol.valueOf("amqp:resource-locked")); 65 } 66 67 static Symbol PRECONDITION_FAILED() { 68 __gshared Symbol inst; 69 return initOnce!inst(Symbol.valueOf("amqp:precondition-failed")); 70 } 71 72 static Symbol RESOURCE_DELETED() { 73 __gshared Symbol inst; 74 return initOnce!inst(Symbol.valueOf("amqp:resource-deleted")); 75 } 76 77 static Symbol ILLEGAL_STATE() { 78 __gshared Symbol inst; 79 return initOnce!inst(Symbol.valueOf("amqp:illegal-state")); 80 } 81 82 static Symbol FRAME_SIZE_TOO_SMALL() { 83 __gshared Symbol inst; 84 return initOnce!inst(Symbol.valueOf("amqp:frame-size-too-small")); 85 } 86 87 // static Symbol FRAME_SIZE_TOO_SMALL() 88 // { 89 // __gshared Symbol inst; 90 // return initOnce!inst(Symbol.valueOf("amqp:frame-size-too-small")); 91 // } 92 93 }