scalawebsocket

WebSocket

Related Docs: object WebSocket | package scalawebsocket

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, Logging, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. WebSocket
  2. StrictLogging
  3. Logging
  4. AnyRef
  5. 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: Any): Boolean

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

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

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

    Definition Classes
    Any
  5. def clone(): AnyRef

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

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

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

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

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

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

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

    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

    Definition Classes
    Any
  14. val logger: Logger

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

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

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

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

  19. def onClose(handler: OnWebSocketOperationHandler): WebSocket

  20. def onError(handler: OnErrorHandler): WebSocket

  21. def onOpen(handler: OnWebSocketOperationHandler): WebSocket

  22. def onTextMessage(handler: OnTextMessageHandler): WebSocket

  23. 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

  24. def removeOnBinaryMessage(handler: OnBinaryMessageHandler): WebSocket

  25. def removeOnClose(handler: OnWebSocketOperationHandler): WebSocket

  26. def removeOnError(handler: OnErrorHandler): WebSocket

  27. def removeOnOpen(handler: OnWebSocketOperationHandler): WebSocket

  28. def removeOnTextMessage(handler: OnTextMessageHandler): WebSocket

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

  30. def sendText(message: String): WebSocket

  31. 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.

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

    Definition Classes
    AnyRef
  33. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from StrictLogging

Inherited from Logging

Inherited from AnyRef

Inherited from Any

Ungrouped