public abstract class BaseServerTransport extends Object implements ServerTransport
ServerTransport.| Modifier and Type | Field and Description |
|---|---|
protected org.atmosphere.vibe.platform.action.Actions<Void> |
closeActions |
protected org.atmosphere.vibe.platform.action.Actions<Throwable> |
errorActions |
protected org.atmosphere.vibe.platform.action.Actions<String> |
textActions |
| Constructor and Description |
|---|
BaseServerTransport() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the connection.
|
ServerTransport |
closeAction(org.atmosphere.vibe.platform.action.Action<Void> action)
Attaches an action for the close event.
|
protected abstract void |
doClose() |
protected abstract void |
doSend(String data) |
ServerTransport |
errorAction(org.atmosphere.vibe.platform.action.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(org.atmosphere.vibe.platform.action.Action<String> action)
Attaches an action for the text message.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitunwrap, uriprotected org.atmosphere.vibe.platform.action.Actions<String> textActions
protected org.atmosphere.vibe.platform.action.Actions<Throwable> errorActions
protected org.atmosphere.vibe.platform.action.Actions<Void> closeActions
public ServerTransport textAction(org.atmosphere.vibe.platform.action.Action<String> action)
ServerTransporttextAction in interface ServerTransportpublic BaseServerTransport send(String data)
ServerTransportsend in interface ServerTransportprotected abstract void doSend(String data)
public ServerTransport errorAction(org.atmosphere.vibe.platform.action.Action<Throwable> action)
ServerTransporterrorAction in interface ServerTransportpublic ServerTransport closeAction(org.atmosphere.vibe.platform.action.Action<Void> action)
ServerTransportcloseAction in interface ServerTransportpublic void close()
ServerTransportclose in interface ServerTransportprotected abstract void doClose()
Copyright 2014, The Vibe Project