-
- All Implemented Interfaces:
public final class WsMessageContext extends WsContext
-
-
Constructor Summary
Constructors Constructor Description WsMessageContext(String sessionId, Session session, String message)
-
Method Summary
Modifier and Type Method Description final String
message()
Receive a string message from the client final <T extends Any> T
messageAsClass(Type type)
Receive a message from the client as a class final <T extends Any> T
messageAsClass(Class<T> clazz)
See Also: messageAsClass final <T extends Any> T
messageAsClass()
Reified version of messageAsClass (Kotlin only) -
Methods inherited from class io.javalin.websocket.WsContext
attribute, attribute, attributeMap, closeSession, closeSession, closeSession, cookie, cookieMap, disableAutomaticPings, enableAutomaticPings, enableAutomaticPings, enableAutomaticPings, enableAutomaticPings, equals, getSessionId, hashCode, header, headerAsClass, headerMap, host, matchedPath, pathParam, pathParamAsClass, pathParamAsClass, pathParamMap, queryParam, queryParamAsClass, queryParamAsClass, queryParamMap, queryParams, queryString, send, send, send, sendAsClass, sendAsClass, sendPing, sendPing, sessionAttribute, sessionAttributeMap
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
messageAsClass
final <T extends Any> T messageAsClass(Type type)
Receive a message from the client as a class
-
messageAsClass
final <T extends Any> T messageAsClass(Class<T> clazz)
See Also: messageAsClass
-
messageAsClass
final <T extends Any> T messageAsClass()
Reified version of messageAsClass (Kotlin only)
-
-
-
-