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.messaging.Target;
14 
15 import hunt.proton.amqp.messaging.Terminus;
16 import hunt.proton.amqp.transport.Target;
17 
18 import hunt.Object;
19 import hunt.String;
20 
21 class Target : Terminus ,hunt.proton.amqp.transport.Target.Target
22 {
23     this (Target other) {
24         super(other);
25     }
26 
27     this() {
28 
29     }
30 
31     // override string toString()
32     // {
33     //     return super.toString;
34     // }
35     override string toString()
36     {
37         String address = getAddress();
38         IObject nodeProperties = getDynamicNodeProperties();
39 
40         return "Target{" ~
41                "address='" ~ (address is null ? "null" : address.toString()) ~ '\'' ~
42                ", durable=" ~ getDurable().toString() ~
43                ", expiryPolicy=" ~ getExpiryPolicy().toString() ~
44                ", timeout=" ~ getTimeout().toString() ~
45                ", dynamic=" ~ getDynamic().toString() ~
46                ", dynamicNodeProperties=" ~ (nodeProperties is null ? "null" : nodeProperties.toString()) ~
47                ", capabilities=" ~ (getCapabilities() is null ? "null" : getCapabilities().toString()) ~
48                '}';
49     }    
50 
51     override
52     public hunt.proton.amqp.transport.Target.Target copy() {
53         return new Target(this);
54     }
55 
56     override
57     String getAddress()
58     {
59         return super.getAddress();
60     }
61 }
62