| | 1 | | // Copyright (c) Microsoft. All rights reserved. |
| | 2 | | // Licensed under the MIT license. See LICENSE file in the project root for full license information. |
| | 3 | |
|
| | 4 | | namespace Microsoft.Azure.ServiceBus.Amqp |
| | 5 | | { |
| | 6 | | using System; |
| | 7 | | using Microsoft.Azure.Amqp; |
| | 8 | | using Microsoft.Azure.Amqp.Encoding; |
| | 9 | |
|
| | 10 | | class AmqpClientConstants |
| | 11 | | { |
| | 12 | | // AMQP Management Operation |
| | 13 | | public const string ManagementAddress = "$management"; |
| | 14 | | public const string EntityTypeManagement = "entity-mgmt"; |
| | 15 | | public const string EntityNameKey = "name"; |
| | 16 | | public const string PartitionNameKey = "partition"; |
| | 17 | | public const string ManagementOperationKey = "operation"; |
| | 18 | | public const string ReadOperationValue = "READ"; |
| | 19 | | public const string ManagementEntityTypeKey = "type"; |
| | 20 | | public const string ManagementSecurityTokenKey = "security_token"; |
| | 21 | |
|
| | 22 | | // Filters |
| | 23 | | public const string FilterOffsetPartName = "amqp.annotation.x-opt-offset"; |
| | 24 | | public const string FilterOffset = FilterOffsetPartName + " > "; |
| | 25 | | public const string FilterInclusiveOffset = FilterOffsetPartName + " >= "; |
| | 26 | | public const string FilterOffsetFormatString = FilterOffset + "'{0}'"; |
| | 27 | | public const string FilterInclusiveOffsetFormatString = FilterInclusiveOffset + "'{0}'"; |
| | 28 | | public const string FilterReceivedAtPartNameV1 = "amqp.annotation.x-opt-enqueuedtimeutc"; |
| | 29 | | public const string FilterReceivedAtPartNameV2 = "amqp.annotation.x-opt-enqueued-time"; |
| | 30 | | public const string FilterReceivedAt = FilterReceivedAtPartNameV2 + " > "; |
| | 31 | | public const string FilterReceivedAtFormatString = FilterReceivedAt + "{0}"; |
| 0 | 32 | | public static readonly AmqpSymbol SessionFilterName = AmqpConstants.Vendor + ":session-filter"; |
| 0 | 33 | | public static readonly AmqpSymbol MessageReceiptsFilterName = AmqpConstants.Vendor + ":message-receipts-filter"; |
| 0 | 34 | | public static readonly AmqpSymbol ClientSideCursorFilterName = AmqpConstants.Vendor + ":client-side-filter"; |
| 0 | 35 | | public static readonly TimeSpan ClientMinimumTokenRefreshInterval = TimeSpan.FromMinutes(4); |
| | 36 | |
|
| | 37 | | // Properties |
| 0 | 38 | | public static readonly AmqpSymbol AttachEpoch = AmqpConstants.Vendor + ":epoch"; |
| 0 | 39 | | public static readonly AmqpSymbol BatchFlushIntervalName = AmqpConstants.Vendor + ":batch-flush-interval"; |
| 0 | 40 | | public static readonly AmqpSymbol EntityTypeName = AmqpConstants.Vendor + ":entity-type"; |
| 0 | 41 | | public static readonly AmqpSymbol TransferDestinationAddress = AmqpConstants.Vendor + ":transfer-destination-add |
| 0 | 42 | | public static readonly AmqpSymbol TimeoutName = AmqpConstants.Vendor + ":timeout"; |
| 0 | 43 | | public static readonly AmqpSymbol TrackingIdName = AmqpConstants.Vendor + ":tracking-id"; |
| | 44 | |
|
| | 45 | | // Error codes |
| 0 | 46 | | public static readonly AmqpSymbol DeadLetterName = AmqpConstants.Vendor + ":dead-letter"; |
| 0 | 47 | | public static readonly AmqpSymbol TimeoutError = AmqpConstants.Vendor + ":timeout"; |
| 0 | 48 | | public static readonly AmqpSymbol AddressAlreadyInUseError = AmqpConstants.Vendor + ":address-already-in-use"; |
| 0 | 49 | | public static readonly AmqpSymbol AuthorizationFailedError = AmqpConstants.Vendor + ":auth-failed"; |
| 0 | 50 | | public static readonly AmqpSymbol MessageLockLostError = AmqpConstants.Vendor + ":message-lock-lost"; |
| 0 | 51 | | public static readonly AmqpSymbol SessionLockLostError = AmqpConstants.Vendor + ":session-lock-lost"; |
| 0 | 52 | | public static readonly AmqpSymbol StoreLockLostError = AmqpConstants.Vendor + ":store-lock-lost"; |
| 0 | 53 | | public static readonly AmqpSymbol SessionCannotBeLockedError = AmqpConstants.Vendor + ":session-cannot-be-locked |
| 0 | 54 | | public static readonly AmqpSymbol NoMatchingSubscriptionError = AmqpConstants.Vendor + ":no-matching-subscriptio |
| 0 | 55 | | public static readonly AmqpSymbol ServerBusyError = AmqpConstants.Vendor + ":server-busy"; |
| 0 | 56 | | public static readonly AmqpSymbol ArgumentError = AmqpConstants.Vendor + ":argument-error"; |
| 0 | 57 | | public static readonly AmqpSymbol ArgumentOutOfRangeError = AmqpConstants.Vendor + ":argument-out-of-range"; |
| 0 | 58 | | public static readonly AmqpSymbol PartitionNotOwnedError = AmqpConstants.Vendor + ":partition-not-owned"; |
| 0 | 59 | | public static readonly AmqpSymbol EntityDisabledError = AmqpConstants.Vendor + ":entity-disabled"; |
| 0 | 60 | | public static readonly AmqpSymbol PublisherRevokedError = AmqpConstants.Vendor + ":publisher-revoked"; |
| 0 | 61 | | public static readonly AmqpSymbol OperationCancelledError = AmqpConstants.Vendor + ":operation-cancelled"; |
| 0 | 62 | | public static readonly AmqpSymbol EntityAlreadyExistsError = AmqpConstants.Vendor + ":entity-already-exists"; |
| 0 | 63 | | public static readonly AmqpSymbol RelayNotFoundError = AmqpConstants.Vendor + ":relay-not-found"; |
| 0 | 64 | | public static readonly AmqpSymbol MessageNotFoundError = AmqpConstants.Vendor + ":message-not-found"; |
| 0 | 65 | | public static readonly AmqpSymbol LockedUntilUtc = AmqpConstants.Vendor + ":locked-until-utc"; |
| | 66 | | } |
| | 67 | | } |