From 0ff144f7f47edc9149c8dd2dbf7448b42193a402 Mon Sep 17 00:00:00 2001 From: "Timothy A. Bish" Date: Thu, 23 Sep 2010 20:47:03 +0000 Subject: [PATCH] fix for: https://issues.apache.org/activemq/browse/AMQ-2942 git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1000617 13f79535-47bb-0310-9956-ffa450edef68 --- .../https/HttpsTransportFactory.java | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/activemq-optional/src/main/java/org/apache/activemq/transport/https/HttpsTransportFactory.java b/activemq-optional/src/main/java/org/apache/activemq/transport/https/HttpsTransportFactory.java index ad98e64448..c8185364c7 100644 --- a/activemq-optional/src/main/java/org/apache/activemq/transport/https/HttpsTransportFactory.java +++ b/activemq-optional/src/main/java/org/apache/activemq/transport/https/HttpsTransportFactory.java @@ -19,10 +19,16 @@ package org.apache.activemq.transport.https; import java.io.IOException; import java.net.MalformedURLException; import java.net.URI; +import java.net.URISyntaxException; +import java.util.Map; +import java.util.HashMap; import org.apache.activemq.transport.Transport; import org.apache.activemq.transport.TransportServer; import org.apache.activemq.transport.http.HttpTransportFactory; +import org.apache.activemq.util.IntrospectionSupport; +import org.apache.activemq.util.IOExceptionSupport; +import org.apache.activemq.util.URISupport; import org.apache.activemq.wireformat.WireFormat; /** @@ -33,11 +39,20 @@ import org.apache.activemq.wireformat.WireFormat; public class HttpsTransportFactory extends HttpTransportFactory { public TransportServer doBind(String brokerId, URI location) throws IOException { - return new HttpsTransportServer(location, this); + return doBind(location); } public TransportServer doBind(URI location) throws IOException { - return new HttpsTransportServer(location, this); + try { + Map options = new HashMap(URISupport.parseParameters(location)); + HttpsTransportServer result = new HttpsTransportServer(location, this); + Map transportOptions = IntrospectionSupport.extractProperties(options, "transport."); + result.setTransportOption(transportOptions); + return result; + } catch (URISyntaxException e) { + throw IOExceptionSupport.create(e); + } + } protected Transport createTransport(URI location, WireFormat wf) throws MalformedURLException {