java.lang.Object
org.omnifaces.cdi.push.SocketEvent
- All Implemented Interfaces:
Serializable
This web socket event will be fired by SocketSessionManager when a socket has been
@SocketEvent.Opened, @SocketEvent.Switched or @SocketEvent.Closed.
An application scoped CDI bean can @Observes them.
For detailed usage instructions, see Socket javadoc.
- Since:
- 2.3
- Author:
- Bauke Scholtz
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interfaceIndicates that a socket has closed.static @interfaceIndicates that a socket has opened.static @interfaceIndicates that a socket user was switched. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the<o:socket channel>.Returns the close code.<S extends Serializable>
SReturns the previous<o:socket user>, if any.<S extends Serializable>
SgetUser()Returns the current<o:socket user>, if any.inthashCode()toString()
-
Method Details
-
getChannel
Returns the<o:socket channel>.- Returns:
- The web socket channel name.
-
getUser
Returns the current<o:socket user>, if any.- Type Parameters:
S- The generic type of the user identifier.- Returns:
- The current web socket user identifier, if any.
- Throws:
ClassCastException- WhenSis of wrong type.
-
getPreviousUser
Returns the previous<o:socket user>, if any.- Type Parameters:
S- The generic type of the user identifier.- Returns:
- The previous web socket user identifier, if any.
- Throws:
ClassCastException- WhenSis of wrong type.- Since:
- 3.2
-
getCloseCode
Returns the close code. If this returnsnull, then it wasSocketEvent.Opened. If this returns non-null, then it wasSocketEvent.Closed.- Returns:
- The close code.
-
hashCode
public int hashCode() -
equals
-
toString
-