[typica] r335 committed - allow port num to be preserved in created objects. fixes issue #43

1 view
Skip to first unread message

typ...@googlecode.com

unread,
Jul 8, 2010, 6:08:18 PM7/8/10
to typic...@googlegroups.com
Revision: 335
Author: dkavanagh
Date: Thu Jul 8 14:02:57 2010
Log: allow port num to be preserved in created objects. fixes issue #43


http://code.google.com/p/typica/source/detail?r=335

Modified:
/trunk/java/com/xerox/amazonws/sdb/Domain.java
/trunk/java/com/xerox/amazonws/sdb/Item.java
/trunk/java/com/xerox/amazonws/sqs2/MessageQueue.java
/trunk/java/com/xerox/amazonws/sqs2/QueueService.java

=======================================
--- /trunk/java/com/xerox/amazonws/sdb/Domain.java Wed May 5 18:11:34 2010
+++ /trunk/java/com/xerox/amazonws/sdb/Domain.java Thu Jul 8 14:02:57 2010
@@ -109,7 +109,7 @@
*/
public Item getItem(String identifier) throws SDBException {
Item ret = new Item(identifier, domainName, getAwsAccessKeyId(),
getSecretAccessKey(),
- isSecure(), getServer());
+ isSecure(), getPort(), getServer());
ret.setSignatureVersion(getSignatureVersion());
ret.setHttpClient(getHttpClient());
return ret;
=======================================
--- /trunk/java/com/xerox/amazonws/sdb/Item.java Wed May 5 18:11:34 2010
+++ /trunk/java/com/xerox/amazonws/sdb/Item.java Thu Jul 8 14:02:57 2010
@@ -57,9 +57,9 @@
private String identifier;

protected Item(String identifier, String domainName, String
awsAccessId,
- String awsSecretKey, boolean isSecure,
+ String awsSecretKey, boolean isSecure, int port,
String server) throws SDBException {
- super(awsAccessId, awsSecretKey, isSecure, server, isSecure ?
443 : 80);
+ super(awsAccessId, awsSecretKey, isSecure, server, port);
this.domainName = domainName;
this.identifier = identifier;
SimpleDB.setVersionHeader(this);
=======================================
--- /trunk/java/com/xerox/amazonws/sqs2/MessageQueue.java Wed May 5
18:11:34 2010
+++ /trunk/java/com/xerox/amazonws/sqs2/MessageQueue.java Thu Jul 8
14:02:57 2010
@@ -71,9 +71,9 @@
private boolean enableEncoding = true;

protected MessageQueue(String queueUrl, String awsAccessId,
- String awsSecretKey, boolean isSecure,
+ String awsSecretKey, boolean isSecure, int port,
String server) throws SQSException {
- super(awsAccessId, awsSecretKey, isSecure, server, isSecure ?
443 : 80);
+ super(awsAccessId, awsSecretKey, isSecure, server, port);
if (queueUrl.startsWith("http")) {
queueId = queueUrl.substring(queueUrl.indexOf("//")+2);
}
@@ -460,11 +460,11 @@
}

public static List<MessageQueue> createList(String [] queueUrls, String
awsAccessId,
- String awsSecretKey, boolean isSecure, String server, HttpClient
hc)
+ String awsSecretKey, boolean isSecure, int port, String server,
HttpClient hc)
throws SQSException {
ArrayList<MessageQueue> ret = new ArrayList<MessageQueue>();
for (int i=0; i<queueUrls.length; i++) {
- MessageQueue mq = new MessageQueue(queueUrls[i], awsAccessId,
awsSecretKey, isSecure, server);
+ MessageQueue mq = new MessageQueue(queueUrls[i], awsAccessId,
awsSecretKey, isSecure, port, server);
mq.setHttpClient(hc);
ret.add(mq);
}
=======================================
--- /trunk/java/com/xerox/amazonws/sqs2/QueueService.java Wed May 5
18:11:34 2010
+++ /trunk/java/com/xerox/amazonws/sqs2/QueueService.java Thu Jul 8
14:02:57 2010
@@ -143,7 +143,7 @@
makeRequestInt(method, "CreateQueue", params,
CreateQueueResponse.class);
MessageQueue ret = new
MessageQueue(response.getCreateQueueResult().getQueueUrl(),
getAwsAccessKeyId(), getSecretAccessKey(),
- isSecure(), getServer());
+ isSecure(), getPort(), getServer());
ret.setHttpClient(getHttpClient());
return ret;
}
@@ -163,7 +163,7 @@
throw new IllegalArgumentException("Queue name must be more fully
specified or use getOrCreateMessageQueue().");
}
MessageQueue ret = new MessageQueue(queueName, getAwsAccessKeyId(),
getSecretAccessKey(),
- isSecure(), getServer());
+ isSecure(), getPort(), getServer());
ret.setHttpClient(getHttpClient());
return ret;
}
@@ -192,7 +192,7 @@
else {
return MessageQueue.createList(urls.toArray(new String[urls.size()]),
getAwsAccessKeyId(), getSecretAccessKey(),
- isSecure(), getServer(), getHttpClient());
+ isSecure(), getPort(), getServer(), getHttpClient());
}
}

Reply all
Reply to author
Forward
0 new messages