org.springframework.web.socket.messaging

## Class SessionConnectEvent

- java.lang.Object
- - java.util.EventObject
  - - org.springframework.context.ApplicationEvent
    - - org.springframework.web.socket.messaging.AbstractSubProtocolEvent
      - - org.springframework.web.socket.messaging.SessionConnectEvent

All Implemented Interfaces:
  Serializable

    public class SessionConnectEvent
    extends AbstractSubProtocolEvent

Event raised when a new WebSocket client using a Simple Messaging Protocol (e.g. STOMP) as the WebSocket sub-protocol issues a connect request.

Note that this is not the same as the WebSocket session getting established but rather the client's first attempt to connect within the sub-protocol, for example sending the STOMP CONNECT frame.

Since:
  4.0.3
Author:
  Rossen Stoyanchev
See Also:
  Serialized Form

### Field Summary

### Fields inherited from class java.util.EventObject

`source`

### Constructor Summary

Constructors
Constructor and Description
`SessionConnectEvent(Object source, org.springframework.messaging.Message<byte[]> message)` Create a new SessionConnectEvent.
`SessionConnectEvent(Object source, org.springframework.messaging.Message<byte[]> message, Principal user)`

### Method Summary

### Methods inherited from class org.springframework.web.socket.messaging.AbstractSubProtocolEvent

`getMessage, getUser, toString`

### Methods inherited from class org.springframework.context.ApplicationEvent

`getTimestamp`

### Methods inherited from class java.util.EventObject

`getSource`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### SessionConnectEvent

    public SessionConnectEvent(Object source,
                               org.springframework.messaging.Message<byte[]> message)

Create a new SessionConnectEvent.

Parameters:
  `source` - the component that published the event (never `null`)
  `message` - the connect message

#### SessionConnectEvent

    public SessionConnectEvent(Object source,
                               org.springframework.messaging.Message<byte[]> message,
                               @Nullable
                               Principal user)