scalawebsocket

WebSocket

class WebSocket extends Logging

WebSocket wrapper for com.ning.http.client.AsyncHttpClient

This is a thin wrapper for com.ning.http.client.AsyncHttpClient that exposes a functional API for attaching handlers to events that com.ning.http.client.AsyncHttpClient exposes.

You can chain nearly every method in this class. The single exception is the shutdown() method, which ends the life of this websocket. After executing it, you need to create a new instance of scalawebsocket.WebSocket

Self Type
WebSocket
Linear Supertypes
Logging, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. WebSocket
  2. Logging
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new WebSocket(client: AsyncHttpClient)

    client

    preconfigured instance of the com.ning.http.client.AsyncHttpClient

Type Members

  1. type OnBinaryMessageHandler = (Array[Byte]) ⇒ Unit

  2. type OnErrorHandler = (Throwable) ⇒ Unit

  3. type OnTextMessageHandler = (String) ⇒ Unit

  4. type OnWebSocketOperationHandler = (WebSocket) ⇒ Unit

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  8. def close(): WebSocket

  9. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  12. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  13. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  14. def internalWebSocketListener: WebSocketListener

    Creates internal websocket listener.

    Creates internal websocket listener.

    This method creates the scalawebsocket.WebSocketListener and runs proper handlers on messages sent by that created listener.

    returns

    an instance of scalawebsocket.WebSocketListener

    Attributes
    protected
  15. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  16. lazy val logger: Logger

    Attributes
    protected
    Definition Classes
    Logging
  17. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  18. final def notify(): Unit

    Definition Classes
    AnyRef
  19. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  20. def onBinaryMessage(handler: (Array[Byte]) ⇒ Unit): WebSocket

  21. def onClose(handler: (WebSocket) ⇒ Unit): WebSocket

  22. def onError(handler: (Throwable) ⇒ Unit): WebSocket

  23. def onOpen(handler: (WebSocket) ⇒ Unit): WebSocket

  24. def onTextMessage(handler: (String) ⇒ Unit): WebSocket

  25. def open(url: String): WebSocket

    Open a websocket to the specified url

    Open a websocket to the specified url

    url

    url to connecto to

    returns

    this scalawebsocket.WebSocket

  26. def removeOnBinaryMessage(handler: (Array[Byte]) ⇒ Unit): WebSocket

  27. def removeOnClose(handler: (WebSocket) ⇒ Unit): WebSocket

  28. def removeOnError(handler: (Throwable) ⇒ Unit): WebSocket

  29. def removeOnOpen(handler: (WebSocket) ⇒ Unit): WebSocket

  30. def removeOnTextMessage(handler: (String) ⇒ Unit): WebSocket

  31. def send(message: Array[Byte]): WebSocket

  32. def sendText(message: String): WebSocket

  33. def shutdown(): Unit

    Closes the underlying com.ning.http.client.AsyncHttpClient client.

    Closes the underlying com.ning.http.client.AsyncHttpClient client.

    This method is terminating the chain. After calling it, this instance of scalawebsocket.WebSocket is no longer useable.

  34. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  35. def toString(): String

    Definition Classes
    AnyRef → Any
  36. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  37. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  38. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from Logging

Inherited from AnyRef

Inherited from Any

Ungrouped