List of usage examples for org.springframework.messaging.simp.stomp StompHeaders setHeartbeat
public void setHeartbeat(@Nullable long[] heartbeat)
From source file:org.springframework.messaging.simp.stomp.StompClientSupport.java
/** * Further initialize the StompHeaders, for example setting the heart-beat * header if necessary./*from w w w. ja v a2s . c o m*/ * @param connectHeaders the headers to modify * @return the modified headers */ protected StompHeaders processConnectHeaders(StompHeaders connectHeaders) { connectHeaders = (connectHeaders != null ? connectHeaders : new StompHeaders()); if (connectHeaders.getHeartbeat() == null) { connectHeaders.setHeartbeat(getDefaultHeartbeat()); } return connectHeaders; }