summaryrefslogtreecommitdiff
path: root/qpid/java/common/src/main
diff options
context:
space:
mode:
authorRajith Muditha Attapattu <rajith@apache.org>2010-03-15 14:17:08 +0000
committerRajith Muditha Attapattu <rajith@apache.org>2010-03-15 14:17:08 +0000
commitc698c596d5d79dcaee85227186d0361ff76a0dae (patch)
tree8e2691c8996ce38784086b53f31c6f7c0fec85e8 /qpid/java/common/src/main
parent95a104a1f34f880c022fbd32776ce1a5019746d6 (diff)
downloadqpid-python-c698c596d5d79dcaee85227186d0361ff76a0dae.tar.gz
This is related to rev 922479
This change should have been commited with the above revision. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@923241 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/common/src/main')
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/transport/ConnectionSettings.java126
1 files changed, 122 insertions, 4 deletions
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/ConnectionSettings.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/ConnectionSettings.java
index c063ef5e6f..aca53d9a6a 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/transport/ConnectionSettings.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/transport/ConnectionSettings.java
@@ -22,6 +22,12 @@ package org.apache.qpid.transport;
import java.util.Map;
+/**
+ * A ConnectionSettings object can only be associated with
+ * one Connection object. I have added an assertion that will
+ * throw an exception if it is used by more than on Connection
+ *
+ */
public class ConnectionSettings
{
String protocol = "tcp";
@@ -29,18 +35,49 @@ public class ConnectionSettings
String vhost;
String username = "guest";
String password = "guest";
- String saslMechs = "PLAIN";
- String saslProtocol = "AMQP";
- String saslServerName = "localhost";
int port = 5672;
+ boolean tcpNodelay;
int maxChannelCount = 32767;
int maxFrameSize = 65535;
int heartbeatInterval;
+
+ // SSL props
boolean useSSL;
+ String keyStorePath;
+ String keyStorePassword;
+ String keyStoreCertType;
+ String trustStoreCertType;
+ String trustStorePath;
+ String trustStorePassword;
+ String certAlias;
+ boolean verifyHostname;
+
+ // SASL props
+ String saslMechs = "PLAIN";
+ String saslProtocol = "AMQP";
+ String saslServerName = "localhost";
boolean useSASLEncryption;
- boolean tcpNodelay;
+
+ private Connection owner;
+
private Map<String, Object> _clientProperties;
+ public Connection getConnection()
+ {
+ return owner;
+ }
+
+ public void setConnection(Connection owner)
+ {
+ if (this.owner != null)
+ {
+ throw new IllegalStateException(
+ "A ConnectionSettings instance can be associated" +
+ " with one and only one Connection instance");
+ }
+ this.owner = owner;
+ }
+
public boolean isTcpNodelay()
{
return tcpNodelay;
@@ -200,4 +237,85 @@ public class ConnectionSettings
{
return _clientProperties;
}
+
+ public String getKeyStorePath()
+ {
+ return keyStorePath;
+ }
+
+ public void setKeyStorePath(String keyStorePath)
+ {
+ this.keyStorePath = keyStorePath;
+ }
+
+ public String getKeyStorePassword()
+ {
+ return keyStorePassword;
+ }
+
+ public void setKeyStorePassword(String keyStorePassword)
+ {
+ this.keyStorePassword = keyStorePassword;
+ }
+
+ public String getTrustStorePath()
+ {
+ return trustStorePath;
+ }
+
+ public void setTrustStorePath(String trustStorePath)
+ {
+ this.trustStorePath = trustStorePath;
+ }
+
+ public String getTrustStorePassword()
+ {
+ return trustStorePassword;
+ }
+
+ public void setTrustStorePassword(String trustStorePassword)
+ {
+ this.trustStorePassword = trustStorePassword;
+ }
+
+ public String getCertAlias()
+ {
+ return certAlias;
+ }
+
+ public void setCertAlias(String certAlias)
+ {
+ this.certAlias = certAlias;
+ }
+
+ public boolean isVerifyHostname()
+ {
+ return verifyHostname;
+ }
+
+ public void setVerifyHostname(boolean verifyHostname)
+ {
+ this.verifyHostname = verifyHostname;
+ }
+
+ public String getKeyStoreCertType()
+ {
+ return keyStoreCertType;
+ }
+
+ public void setKeyStoreCertType(String keyStoreCertType)
+ {
+ this.keyStoreCertType = keyStoreCertType;
+ }
+
+ public String getTrustStoreCertType()
+ {
+ return trustStoreCertType;
+ }
+
+ public void setTrustStoreCertType(String trustStoreCertType)
+ {
+ this.trustStoreCertType = trustStoreCertType;
+ }
+
}