1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.springframework.ws.soap.addressing.core;
18
19 import java.io.Serializable;
20 import java.net.URI;
21 import java.util.Collections;
22 import java.util.List;
23
24 import org.springframework.util.Assert;
25
26 import org.w3c.dom.Node;
27
28
29
30
31
32
33
34
35 public final class EndpointReference implements Serializable {
36
37 private static final long serialVersionUID = 8999416009328865260L;
38
39 private final URI address;
40
41 private final List<Node> referenceProperties;
42
43 private final List<Node> referenceParameters;
44
45
46
47
48
49
50
51 public EndpointReference(URI address) {
52 Assert.notNull(address, "address must not be null");
53 this.address = address;
54 this.referenceParameters = Collections.emptyList();
55 this.referenceProperties = Collections.emptyList();
56 }
57
58
59
60
61
62
63
64
65
66 public EndpointReference(URI address, List<Node> referenceProperties, List<Node> referenceParameters) {
67 Assert.notNull(address, "address must not be null");
68 Assert.notNull(referenceProperties, "referenceProperties must not be null");
69 Assert.notNull(referenceParameters, "referenceParameters must not be null");
70 this.address = address;
71 this.referenceProperties = referenceProperties;
72 this.referenceParameters = referenceParameters;
73 }
74
75
76 public URI getAddress() {
77 return address;
78 }
79
80
81 public List<Node> getReferenceProperties() {
82 return referenceProperties;
83 }
84
85
86 public List<Node> getReferenceParameters() {
87 return referenceParameters;
88 }
89
90 public boolean equals(Object o) {
91 if (this == o) {
92 return true;
93 }
94 if (o != null && o instanceof EndpointReference) {
95 EndpointReference other = (EndpointReference) o;
96 return address.equals(other.address);
97 }
98 return false;
99 }
100
101 public int hashCode() {
102 return address.hashCode();
103 }
104
105 public String toString() {
106 return address.toString();
107 }
108 }