git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1158044 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Timothy A. Bish 2011-08-15 22:30:39 +00:00
parent e917f46656
commit 7557f0cfa5
5 changed files with 33 additions and 8 deletions

View File

@ -40,6 +40,9 @@ public class CreateSubscriber extends DurableSubscriberFacade implements Control
}
public void setSelector(String selector) {
if (selector != null) {
selector = selector.trim();
}
this.selector = selector;
}

View File

@ -31,8 +31,8 @@ import org.springframework.web.servlet.mvc.Controller;
/**
* Sends a message
*
*
*
*
*/
public class SendMessage extends DestinationFacade implements Controller {
@ -88,6 +88,9 @@ public class SendMessage extends DestinationFacade implements Controller {
}
public void setJMSCorrelationID(String correlationID) {
if (correlationID != null) {
correlationID = correlationID.trim();
}
jmsCorrelationID = correlationID;
}
@ -96,6 +99,9 @@ public class SendMessage extends DestinationFacade implements Controller {
}
public void setJMSReplyTo(String replyTo) {
if (replyTo != null) {
replyTo = replyTo.trim();
}
jmsReplyTo = replyTo;
}
@ -104,6 +110,9 @@ public class SendMessage extends DestinationFacade implements Controller {
}
public void setJMSType(String type) {
if (type != null) {
type = type.trim();
}
jmsType = type;
}
@ -152,6 +161,9 @@ public class SendMessage extends DestinationFacade implements Controller {
}
public void setJMSMessageCountHeader(String messageCountHeader) {
if (messageCountHeader != null) {
messageCountHeader = messageCountHeader.trim();
}
jmsMessageCountHeader = messageCountHeader;
}
@ -165,6 +177,7 @@ public class SendMessage extends DestinationFacade implements Controller {
return client.getSession().createMessage();
}
@SuppressWarnings("rawtypes")
protected void appendHeaders(Message message, HttpServletRequest request) throws JMSException {
message.setJMSCorrelationID(jmsCorrelationID);
if (jmsReplyTo != null && jmsReplyTo.trim().length() > 0) {
@ -179,7 +192,7 @@ public class SendMessage extends DestinationFacade implements Controller {
Map.Entry entry = (Map.Entry) iter.next();
String name = (String) entry.getKey();
if (name.equals("secret")) {
continue;
continue;
}
Object value = entry.getValue();
if (isValidPropertyName(name)) {
@ -233,8 +246,8 @@ public class SendMessage extends DestinationFacade implements Controller {
// allow JMSX extensions or non JMS properties
return name.startsWith("JMSX") || !name.startsWith("JMS");
}
public String[] getSupportedHttpMethods() {
return new String[]{"POST"};
}
public String[] getSupportedHttpMethods() {
return new String[]{"POST"};
}
}

View File

@ -88,6 +88,9 @@ public class DestinationFacade {
}
public void setJMSDestination(String destination) {
if (destination != null) {
destination = destination.trim();
}
this.jmsDestination = destination;
}

View File

@ -34,6 +34,9 @@ public class DurableSubscriberFacade extends DestinationFacade {
}
public void setClientId(String clientId) {
if (clientId != null) {
clientId = clientId.trim();
}
this.clientId = clientId;
}
@ -42,6 +45,9 @@ public class DurableSubscriberFacade extends DestinationFacade {
}
public void setSubscriberName(String subscriberName) {
if (subscriberName != null) {
subscriberName = subscriberName.trim();
}
this.subscriberName = subscriberName;
}

View File

@ -21,7 +21,7 @@
<p>
Web Connectors so that messages can be sent via HTTP POST or read via
HTTP POST or GET as well as support for web streaming to we browser or
HTTP POST or GET as well as support for web streaming to web browser or
JavaScript clients.
</p>