Update websocket xml namespace attributes
This commit is contained in:
parent
cea049b791
commit
bb5a53f7f7
|
|
@ -304,25 +304,25 @@ class MessageBrokerBeanDefinitionParser implements BeanDefinitionParser {
|
|||
if(!relayPort.isEmpty()) {
|
||||
mpvs.add("relayPort", Integer.valueOf(relayPort));
|
||||
}
|
||||
String systemLogin = brokerRelayElem.getAttribute("system-login");
|
||||
if(!systemLogin.isEmpty()) {
|
||||
mpvs.add("systemLogin",systemLogin);
|
||||
String attrValue = brokerRelayElem.getAttribute("login");
|
||||
if(!attrValue.isEmpty()) {
|
||||
mpvs.add("systemLogin",attrValue);
|
||||
}
|
||||
String systemPasscode = brokerRelayElem.getAttribute("system-passcode");
|
||||
if(!systemPasscode.isEmpty()) {
|
||||
mpvs.add("systemPasscode",systemPasscode);
|
||||
attrValue = brokerRelayElem.getAttribute("passcode");
|
||||
if(!attrValue.isEmpty()) {
|
||||
mpvs.add("systemPasscode", attrValue);
|
||||
}
|
||||
String systemHeartbeatSendInterval = brokerRelayElem.getAttribute("system-heartbeat-send-interval");
|
||||
if(!systemHeartbeatSendInterval.isEmpty()) {
|
||||
mpvs.add("systemHeartbeatSendInterval",Long.parseLong(systemHeartbeatSendInterval));
|
||||
attrValue = brokerRelayElem.getAttribute("heartbeat-send-interval");
|
||||
if(!attrValue.isEmpty()) {
|
||||
mpvs.add("systemHeartbeatSendInterval", Long.parseLong(attrValue));
|
||||
}
|
||||
String systemHeartbeatReceiveInterval = brokerRelayElem.getAttribute("system-heartbeat-receive-interval");
|
||||
if(!systemHeartbeatReceiveInterval.isEmpty()) {
|
||||
mpvs.add("systemHeartbeatReceiveInterval",Long.parseLong(systemHeartbeatReceiveInterval));
|
||||
attrValue = brokerRelayElem.getAttribute("heartbeat-receive-interval");
|
||||
if(!attrValue.isEmpty()) {
|
||||
mpvs.add("systemHeartbeatReceiveInterval", Long.parseLong(attrValue));
|
||||
}
|
||||
String virtualHost = brokerRelayElem.getAttribute("virtual-host");
|
||||
if(!virtualHost.isEmpty()) {
|
||||
mpvs.add("virtualHost",virtualHost);
|
||||
attrValue = brokerRelayElem.getAttribute("virtual-host");
|
||||
if(!attrValue.isEmpty()) {
|
||||
mpvs.add("virtualHost", attrValue);
|
||||
}
|
||||
|
||||
Class<?> handlerType = StompBrokerRelayMessageHandler.class;
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ class WebSocketNamespaceUtils {
|
|||
|
||||
// TODO: polish the way constructor arguments are set
|
||||
|
||||
String customTaskSchedulerName = sockJsElement.getAttribute("task-scheduler");
|
||||
String customTaskSchedulerName = sockJsElement.getAttribute("scheduler");
|
||||
if (!customTaskSchedulerName.isEmpty()) {
|
||||
cavs.addIndexedArgumentValue(0, new RuntimeBeanReference(customTaskSchedulerName));
|
||||
}
|
||||
|
|
@ -126,7 +126,7 @@ class WebSocketNamespaceUtils {
|
|||
if (!attrValue.isEmpty()) {
|
||||
sockJsServiceDef.getPropertyValues().add("disconnectDelay", Long.valueOf(attrValue));
|
||||
}
|
||||
attrValue = sockJsElement.getAttribute("http-message-cache-size");
|
||||
attrValue = sockJsElement.getAttribute("message-cache-size");
|
||||
if (!attrValue.isEmpty()) {
|
||||
sockJsServiceDef.getPropertyValues().add("httpMessageCacheSize", Integer.valueOf(attrValue));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -100,11 +100,11 @@
|
|||
</xsd:attribute>
|
||||
<xsd:attribute name="disconnect-delay" type="xsd:long">
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="http-message-cache-size" type="xsd:long">
|
||||
<xsd:attribute name="message-cache-size" type="xsd:long">
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="websocket-enabled" type="xsd:boolean">
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="task-scheduler" type="xsd:string">
|
||||
<xsd:attribute name="scheduler" type="xsd:string">
|
||||
</xsd:attribute>
|
||||
</xsd:complexType>
|
||||
|
||||
|
|
@ -112,10 +112,10 @@
|
|||
<xsd:attribute name="prefix" type="xsd:string"></xsd:attribute>
|
||||
<xsd:attribute name="relay-host" type="xsd:string"></xsd:attribute>
|
||||
<xsd:attribute name="relay-port" type="xsd:integer"></xsd:attribute>
|
||||
<xsd:attribute name="system-login" type="xsd:string"></xsd:attribute>
|
||||
<xsd:attribute name="system-passcode" type="xsd:string"></xsd:attribute>
|
||||
<xsd:attribute name="system-heartbeat-send-interval" type="xsd:long"></xsd:attribute>
|
||||
<xsd:attribute name="system-heartbeat-receive-interval" type="xsd:long"></xsd:attribute>
|
||||
<xsd:attribute name="login" type="xsd:string"></xsd:attribute>
|
||||
<xsd:attribute name="passcode" type="xsd:string"></xsd:attribute>
|
||||
<xsd:attribute name="heartbeat-send-interval" type="xsd:long"></xsd:attribute>
|
||||
<xsd:attribute name="heartbeat-receive-interval" type="xsd:long"></xsd:attribute>
|
||||
<xsd:attribute name="auto-startup" type="xsd:boolean"></xsd:attribute>
|
||||
<xsd:attribute name="virtual-host" type="xsd:string"></xsd:attribute>
|
||||
</xsd:complexType>
|
||||
|
|
|
|||
|
|
@ -9,14 +9,8 @@
|
|||
<websocket:handshake-handler ref="myHandler"/>
|
||||
<websocket:sockjs/>
|
||||
</websocket:stomp-endpoint>
|
||||
<websocket:stomp-broker-relay
|
||||
prefix="/topic,/queue"
|
||||
relay-host="relayhost"
|
||||
relay-port="1234"
|
||||
system-login="login"
|
||||
system-passcode="pass"
|
||||
system-heartbeat-send-interval="5000"
|
||||
system-heartbeat-receive-interval="5000"
|
||||
<websocket:stomp-broker-relay prefix="/topic,/queue" relay-host="relayhost" relay-port="1234"
|
||||
login="login" passcode="pass" heartbeat-send-interval="5000" heartbeat-receive-interval="5000"
|
||||
virtual-host="spring.io"/>
|
||||
</websocket:message-broker>
|
||||
|
||||
|
|
|
|||
|
|
@ -7,14 +7,9 @@
|
|||
|
||||
<websocket:handlers >
|
||||
<websocket:mapping path="/test" handler="testHandler"/>
|
||||
<websocket:sockjs task-scheduler="testTaskScheduler"
|
||||
name="testSockJsService"
|
||||
websocket-enabled="false"
|
||||
session-cookie-needed="false"
|
||||
stream-bytes-limit="2048"
|
||||
disconnect-delay="256"
|
||||
http-message-cache-size="1024"
|
||||
heartbeat-time="20">
|
||||
<websocket:sockjs name="testSockJsService" scheduler="testTaskScheduler" websocket-enabled="false"
|
||||
session-cookie-needed="false" stream-bytes-limit="2048" disconnect-delay="256"
|
||||
message-cache-size="1024" heartbeat-time="20">
|
||||
<websocket:transport-handlers register-defaults="false">
|
||||
<bean class="org.springframework.web.socket.sockjs.transport.handler.XhrPollingTransportHandler"/>
|
||||
<ref bean="xhrStreamingTransportHandler"/>
|
||||
|
|
|
|||
Loading…
Reference in New Issue