public abstract class BaseServerTransport extends Object implements ServerTransport
ServerTransport.| Modifier and Type | Field and Description |
|---|---|
protected Actions<Void> |
closeActions |
protected Actions<Throwable> |
errorActions |
protected Actions<String> |
textActions |
| Constructor and Description |
|---|
BaseServerTransport() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the connection.
|
ServerTransport |
closeAction(Action<Void> action)
Attaches an action for the close event.
|
protected abstract void |
doClose() |
protected abstract void |
doSend(String data) |
ServerTransport |
errorAction(Action<Throwable> action)
Executed if there was any error on the connection.
|
BaseServerTransport |
send(String data)
Sends a text message through the connection.
|
ServerTransport |
textAction(Action<String> action)
Attaches an action for the text message.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitunwrap, uripublic ServerTransport textAction(Action<String> action)
ServerTransporttextAction in interface ServerTransportpublic BaseServerTransport send(String data)
ServerTransportsend in interface ServerTransportprotected abstract void doSend(String data)
public ServerTransport errorAction(Action<Throwable> action)
ServerTransporterrorAction in interface ServerTransportpublic ServerTransport closeAction(Action<Void> action)
ServerTransportcloseAction in interface ServerTransportpublic void close()
ServerTransportclose in interface ServerTransportprotected abstract void doClose()
Copyright 2014, The Vibe Project