public abstract class BaseServerTransport extends Object implements ServerTransport
ServerTransport.| Modifier and Type | Field and Description | 
|---|---|
| protected Actions<ByteBuffer> | binaryActions | 
| 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. | 
| protected abstract void | doClose() | 
| protected abstract void | doSend(ByteBuffer data) | 
| protected abstract void | doSend(String data) | 
| ServerTransport | onbinary(Action<ByteBuffer> action)Attaches an action for the binary message. | 
| ServerTransport | onclose(Action<Void> action)Attaches an action for the close event. | 
| ServerTransport | onerror(Action<Throwable> action)Executed if there was any error on the connection. | 
| ServerTransport | ontext(Action<String> action)Attaches an action for the text message. | 
| ServerTransport | send(ByteBuffer data)Sends a binary message through the connection. | 
| BaseServerTransport | send(String data)Sends a text message through the connection. | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitunwrap, uriprotected Actions<ByteBuffer> binaryActions
public ServerTransport ontext(Action<String> action)
ServerTransportontext in interface ServerTransportpublic ServerTransport onbinary(Action<ByteBuffer> action)
ServerTransportonbinary in interface ServerTransportpublic BaseServerTransport send(String data)
ServerTransportsend in interface ServerTransportpublic ServerTransport send(ByteBuffer data)
ServerTransportsend in interface ServerTransportprotected abstract void doSend(String data)
protected abstract void doSend(ByteBuffer data)
public ServerTransport onerror(Action<Throwable> action)
ServerTransportonerror in interface ServerTransportpublic ServerTransport onclose(Action<Void> action)
ServerTransportonclose in interface ServerTransportpublic void close()
ServerTransportclose in interface ServerTransportprotected abstract void doClose()
Copyright 2015, The Cettia Project