Class/Object

scalawebsocket

WebSocket

Related Docs: object WebSocket | package scalawebsocket

Permalink

class WebSocket extends StrictLogging

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
StrictLogging, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. WebSocket
  2. StrictLogging
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new WebSocket(client: AsyncHttpClient)

    Permalink

    client

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

Type Members

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

    Permalink
  2. type OnErrorHandler = (Throwable) ⇒ Unit

    Permalink
  3. type OnTextMessageHandler = (String) ⇒ Unit

    Permalink
  4. type OnWebSocketOperationHandler = (WebSocket) ⇒ Unit

    Permalink

Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

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

    Permalink
  7. final def eq(arg0: AnyRef): Boolean

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

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  12. def internalWebSocketListener: WebSocketListener { ... /* 2 definitions in type refinement */ }

    Permalink

    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
  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. val logger: Logger

    Permalink
    Attributes
    protected
    Definition Classes
    StrictLogging
  15. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  16. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. def onBinaryMessage(handler: OnBinaryMessageHandler): WebSocket

    Permalink
  19. def onClose(handler: OnWebSocketOperationHandler): WebSocket

    Permalink
  20. def onError(handler: OnErrorHandler): WebSocket

    Permalink
  21. def onOpen(handler: OnWebSocketOperationHandler): WebSocket

    Permalink
  22. def onTextMessage(handler: OnTextMessageHandler): WebSocket

    Permalink
  23. def open(url: String): WebSocket

    Permalink

    Open a websocket to the specified url

    Open a websocket to the specified url

    url

    url to connecto to

    returns

    this scalawebsocket.WebSocket

  24. def removeOnBinaryMessage(handler: OnBinaryMessageHandler): WebSocket

    Permalink
  25. def removeOnClose(handler: OnWebSocketOperationHandler): WebSocket

    Permalink
  26. def removeOnError(handler: OnErrorHandler): WebSocket

    Permalink
  27. def removeOnOpen(handler: OnWebSocketOperationHandler): WebSocket

    Permalink
  28. def removeOnTextMessage(handler: OnTextMessageHandler): WebSocket

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

    Permalink
  30. def sendText(message: String): WebSocket

    Permalink
  31. def shutdown(): Unit

    Permalink

    Closes the underlying org.asynchttpclient.AsyncHttpClient client.

    Closes the underlying org.asynchttpclient.AsyncHttpClient client.

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

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

    Permalink
    Definition Classes
    AnyRef
  33. def toString(): String

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from StrictLogging

Inherited from AnyRef

Inherited from Any

Ungrouped