You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ra...@apache.org on 2010/03/15 15:17:08 UTC
svn commit: r923241 -
/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/ConnectionSettings.java
Author: rajith
Date: Mon Mar 15 14:17:08 2010
New Revision: 923241
URL: http://svn.apache.org/viewvc?rev=923241&view=rev
Log:
This is related to rev 922479
This change should have been commited with the above revision.
Modified:
qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/ConnectionSettings.java
Modified: qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/ConnectionSettings.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/ConnectionSettings.java?rev=923241&r1=923240&r2=923241&view=diff
==============================================================================
--- qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/ConnectionSettings.java (original)
+++ qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/ConnectionSettings.java Mon Mar 15 14:17:08 2010
@@ -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;
+ }
+
}
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org