public final class XmppWebSocketDecoder extends java.lang.Object implements javax.websocket.Decoder.Text<StreamElement>
Decodes WebSocket text messages to XMPP StreamElements.
The required Unmarshaller for decoding must be supplied via EndpointConfig.getUserProperties(), see XmppWebSocketDecoder.UserProperties.UNMARSHALLER.
Optionally you can also provide a callback, which is called after unmarshalling with the XML string (the text message) and the unmarshalled element. This is useful for debugging purposes, see XmppWebSocketDecoder.UserProperties.ON_READ.
| Modifier and Type | Class and Description |
|---|---|
static class |
XmppWebSocketDecoder.UserProperties
User properties for usage in
EndpointConfig.getUserProperties(). |
| Constructor and Description |
|---|
XmppWebSocketDecoder() |
| Modifier and Type | Method and Description |
|---|---|
StreamElement |
decode(java.lang.String s) |
void |
destroy() |
void |
init(javax.websocket.EndpointConfig config) |
boolean |
willDecode(java.lang.String s) |
public final StreamElement decode(java.lang.String s) throws javax.websocket.DecodeException
decode in interface javax.websocket.Decoder.Text<StreamElement>javax.websocket.DecodeExceptionpublic final boolean willDecode(java.lang.String s)
willDecode in interface javax.websocket.Decoder.Text<StreamElement>public final void init(javax.websocket.EndpointConfig config)
init in interface javax.websocket.Decoderpublic final void destroy()
destroy in interface javax.websocket.DecoderCopyright © 2014–2019 XMPP.rocks. All rights reserved.