public abstract class AbstractWebsocket<T extends WsData>
extends java.lang.Object
Constructor and Description |
---|
AbstractWebsocket(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
protected abstract T |
createWsData()
Creates an empty WsData object that is attached to the WebSocket as early as
possible
|
java.lang.String |
getName()
Gets the internal name of this websocket client/server
|
protected abstract OnClose |
getOnClose()
Callback for websocket OnClose event
|
protected abstract OnError |
getOnError()
Callback for websocket error
|
protected abstract OnInternalError |
getOnInternalError()
Callback for internal error
|
protected abstract OnNotification |
getOnNotification()
Callback for JSON-RPC notification
|
protected abstract OnOpen |
getOnOpen()
Callback for websocket OnOpen event
|
protected abstract OnRequest |
getOnRequest()
Callback for JSON-RPC request
|
protected void |
handleInternalErrorAsync(java.lang.Exception e)
Handles an internal Error asynchronously
|
protected void |
handleInternalErrorSync(java.lang.Exception e,
java.lang.String wsDataString)
Handles an internal Error synchronously
|
protected abstract void |
logInfo(org.slf4j.Logger log,
java.lang.String message)
Log a info message.
|
protected abstract void |
logWarn(org.slf4j.Logger log,
java.lang.String message)
Log a warn message.
|
protected abstract T createWsData()
protected abstract OnInternalError getOnInternalError()
protected abstract OnOpen getOnOpen()
protected abstract OnRequest getOnRequest()
protected abstract OnNotification getOnNotification()
protected abstract OnError getOnError()
protected abstract OnClose getOnClose()
public java.lang.String getName()
protected void handleInternalErrorAsync(java.lang.Exception e)
e
- protected void handleInternalErrorSync(java.lang.Exception e, java.lang.String wsDataString)
e
- protected abstract void logInfo(org.slf4j.Logger log, java.lang.String message)
log
- a Logger instancemessage
- the messageprotected abstract void logWarn(org.slf4j.Logger log, java.lang.String message)
log
- a Logger instancemessage
- the message