Example usage for org.springframework.messaging.simp.stomp DefaultStompSession DefaultStompSession

List of usage examples for org.springframework.messaging.simp.stomp DefaultStompSession DefaultStompSession

Introduction

In this page you can find the example usage for org.springframework.messaging.simp.stomp DefaultStompSession DefaultStompSession.

Prototype

public DefaultStompSession(StompSessionHandler sessionHandler, StompHeaders connectHeaders) 

Source Link

Document

Create a new session.

Usage

From source file:org.springframework.messaging.simp.stomp.StompClientSupport.java

/**
 * Factory method for create and configure a new session.
 * @param connectHeaders headers for the STOMP CONNECT frame
 * @param handler the handler for the STOMP session
 * @return the created session/*from ww w.j  av a  2 s . com*/
 */
protected ConnectionHandlingStompSession createSession(StompHeaders connectHeaders,
        StompSessionHandler handler) {
    connectHeaders = processConnectHeaders(connectHeaders);
    DefaultStompSession session = new DefaultStompSession(handler, connectHeaders);
    session.setMessageConverter(getMessageConverter());
    session.setTaskScheduler(getTaskScheduler());
    session.setReceiptTimeLimit(getReceiptTimeLimit());
    return session;
}