1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.opensaml.ws.transport;
18
19 import java.util.HashMap;
20 import java.util.Map;
21
22 import org.opensaml.xml.security.credential.Credential;
23
24
25
26
27 public abstract class BaseTransport implements Transport {
28
29
30 private Credential localCredential;
31
32
33 private Credential peerCredential;
34
35
36 private Map<String, Object> attributes;
37
38
39 private String characterEncoding;
40
41
42 private boolean authenticated;
43
44
45 private boolean confidential;
46
47
48 private boolean integrityProtected;
49
50
51 public BaseTransport() {
52 attributes = new HashMap<String, Object>();
53 }
54
55
56 public Object getAttribute(String name) {
57 return attributes.get(name);
58 }
59
60
61 public String getCharacterEncoding() {
62 return characterEncoding;
63 }
64
65
66 public Credential getLocalCredential() {
67 return localCredential;
68 }
69
70
71 public Credential getPeerCredential() {
72 return peerCredential;
73 }
74
75
76 public boolean isAuthenticated() {
77 return authenticated;
78 }
79
80
81 public boolean isConfidential() {
82 return confidential;
83 }
84
85
86 public boolean isIntegrityProtected() {
87 return integrityProtected;
88 }
89
90
91 public void setAuthenticated(boolean isAuthenticated) {
92 authenticated = isAuthenticated;
93 }
94
95
96 public void setConfidential(boolean isConfidential) {
97 confidential = isConfidential;
98 }
99
100
101 public void setIntegrityProtected(boolean isIntegrityProtected) {
102 integrityProtected = isIntegrityProtected;
103 }
104
105
106
107
108
109
110
111 protected void setAttribute(String name, Object value) {
112 attributes.put(name, value);
113 }
114
115
116
117
118
119
120 protected void setCharacterEncoding(String encoding) {
121 characterEncoding = encoding;
122 }
123
124 }