@ PostConstruct protected void startRTMAndWebSocketConnection ( ) { slackService . connectRTM ( getSlackToken ( ) ) ; if ( slackService . getWebSocketUrl ( ) != null ) { webSocketManager = new WebSocketConnectionManager ( client ( ) , handler ( ) , slackService . getWebSocketUrl ( ) ) ; webSocketManager . start ( ) ; } else { logger . error ( "No web socket url returned by Slack." ) ; } }
Entry point where the web socket connection starts and after which your bot becomes live .