org.springframework.messaging.simp.user

## Interface SimpUser

    public interface SimpUser

Represents a connected user.

Since:
  4.2
Author:
  Rossen Stoyanchev

### Method Summary

All Methods Instance Methods Abstract Methods
`String` `getName()` The unique user name.
`SimpSession` `getSession(String sessionId)` Look up the session for the given id.
`Set<SimpSession>` `getSessions()` Return the sessions for the user.
`boolean` `hasSessions()` Whether the user has any sessions.

### Method Detail

#### getName

    String getName()

The unique user name.

#### hasSessions

    boolean hasSessions()

Whether the user has any sessions.

#### getSession

    @Nullable
    SimpSession getSession(String sessionId)

Look up the session for the given id.

Parameters:
  `sessionId` - the session id
Returns:
  the matching session, or `null` if none found

#### getSessions

    Set<SimpSession> getSessions()

Return the sessions for the user. The returned set is a copy and will never be modified.

Returns:
  a set of session ids, or an empty set if none