Class AbstractWebSocket
- java.lang.Object
-
- org.jivesoftware.smack.websocket.impl.AbstractWebSocket
-
- Direct Known Subclasses:
Java11WebSocket
,OkHttpWebSocket
public abstract class AbstractWebSocket extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected ModularXmppClientToServerConnectionInternal
connectionInternal
protected WebSocketRemoteConnectionEndpoint
endpoint
protected SmackFuture.InternalSmackFuture<AbstractWebSocket,Exception>
future
protected static Logger
LOGGER
protected static String
SEC_WEBSOCKET_PROTOCOL_HEADER_FILED_NAME
protected static String
SEC_WEBSOCKET_PROTOCOL_HEADER_FILED_VALUE_XMPP
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractWebSocket(WebSocketRemoteConnectionEndpoint endpoint, ModularXmppClientToServerConnectionInternal connectionInternal)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
disconnect(int code, String message)
WebSocketRemoteConnectionEndpoint
getEndpoint()
SmackFuture<AbstractWebSocket,Exception>
getFuture()
abstract SSLSession
getSSLSession()
boolean
isConnectionSecure()
protected void
onIncomingWebSocketElement(String element)
protected void
onWebSocketFailure(Throwable throwable)
protected abstract void
send(String element)
void
send(TopLevelStreamElement element)
String
toString()
-
-
-
Field Detail
-
SEC_WEBSOCKET_PROTOCOL_HEADER_FILED_NAME
protected static final String SEC_WEBSOCKET_PROTOCOL_HEADER_FILED_NAME
- See Also:
- Constant Field Values
-
SEC_WEBSOCKET_PROTOCOL_HEADER_FILED_VALUE_XMPP
protected static final String SEC_WEBSOCKET_PROTOCOL_HEADER_FILED_VALUE_XMPP
- See Also:
- Constant Field Values
-
future
protected final SmackFuture.InternalSmackFuture<AbstractWebSocket,Exception> future
-
connectionInternal
protected final ModularXmppClientToServerConnectionInternal connectionInternal
-
endpoint
protected final WebSocketRemoteConnectionEndpoint endpoint
-
-
Constructor Detail
-
AbstractWebSocket
protected AbstractWebSocket(WebSocketRemoteConnectionEndpoint endpoint, ModularXmppClientToServerConnectionInternal connectionInternal)
-
-
Method Detail
-
getEndpoint
public final WebSocketRemoteConnectionEndpoint getEndpoint()
-
onIncomingWebSocketElement
protected final void onIncomingWebSocketElement(String element)
-
onWebSocketFailure
protected void onWebSocketFailure(Throwable throwable)
-
getFuture
public final SmackFuture<AbstractWebSocket,Exception> getFuture()
-
send
public final void send(TopLevelStreamElement element)
-
disconnect
public abstract void disconnect(int code, String message)
-
isConnectionSecure
public boolean isConnectionSecure()
-
getSSLSession
public abstract SSLSession getSSLSession()
-
-