io.backchat.hookup

DefaultHookupClient

class DefaultHookupClient extends HookupClient

Usage of the simple websocket client:

  new DefaultHookupClient(HookupClientConfig(new URI("ws://localhost:8080/thesocket"))) {

    def receive = {
      case Disconnected(_) ⇒ println("The websocket to " + uri.toASCIIString + " disconnected.")
      case TextMessage(message) ⇒ {
        println("RECV: " + message)
        send("ECHO: " + message)
      }
    }

    connect() onSuccess {
      case Success ⇒
        println("The websocket is connected.")
      case _ ⇒
    }
  }

Attributes
abstract
Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. DefaultHookupClient
  2. HookupClient
  3. Closeable
  4. AutoCloseable
  5. Reconnectable
  6. Connectable
  7. HookupClientLike
  8. BroadcastChannelLike
  9. AnyRef
  10. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new DefaultHookupClient (settings: HookupClientConfig)

Abstract Value Members

  1. def receive : Receive

    Handle inbound InboundMessage instances

    Handle inbound InboundMessage instances

    returns

    a io.backchat.hookup.HookupClient.Receive as message handler

    Attributes
    abstract
    Definition Classes
    HookupClientLike

Concrete Value Members

  1. def ! (message: OutboundMessage): Future[OperationResult]

    Send a message to the server.

    Send a message to the server.

    message

    The OutboundMessage to send

    returns

    A akka.dispatch.Future with the OperationResult

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

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

    Attributes
    final
    Definition Classes
    Any
  4. def ## (): Int

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

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

    Attributes
    final
    Definition Classes
    Any
  7. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  8. def buffered : Boolean

    A flag indicating whether this websocket client can fallback to buffering.

    A flag indicating whether this websocket client can fallback to buffering.

    returns

    whether this websocket client can fallback to buffering or not.

    Definition Classes
    HookupClient
  9. def clone (): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  10. def close (): Unit

    Attributes
    final
    Definition Classes
    HookupClient → Closeable → AutoCloseable
  11. def connect (protocols: String*): Future[OperationResult]

    Connect to the server.

    Connect to the server.

    returns

    A akka.dispatch.Future with the OperationResult

    Attributes
    final
    Definition Classes
    HookupClientConnectable
  12. def disconnect (): Future[OperationResult]

    Disconnect from the server.

    Disconnect from the server.

    returns

    A akka.dispatch.Future with the OperationResult

    Attributes
    final
    Definition Classes
    HookupClientBroadcastChannelLike
  13. def eq (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  14. def equals (arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  15. implicit lazy val executionContext : ExecutionContext

    The execution context for futures within this client.

    The execution context for futures within this client.

    returns

    The akka.dispatch.ExecutionContext

    Attributes
    protected implicit
    Definition Classes
    HookupClient
  16. def finalize (): Unit

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

    Attributes
    final
    Definition Classes
    AnyRef → Any
  18. def hashCode (): Int

    Definition Classes
    AnyRef → Any
  19. def isConnected : Boolean

    A flag indicating connection status.

    A flag indicating connection status.

    returns

    a boolean indicating connection status

    Definition Classes
    HookupClientConnectable
  20. def isInstanceOf [T0] : Boolean

    Attributes
    final
    Definition Classes
    Any
  21. def ne (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  22. def notify (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  23. def notifyAll (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  24. def reconnect (): Future[OperationResult]

    Reconnect to the server.

    Reconnect to the server.

    returns

    A akka.dispatch.Future with the OperationResult

    Definition Classes
    HookupClientReconnectable
  25. def send (message: OutboundMessage): Future[OperationResult]

    Send a message to the server.

    Send a message to the server.

    message

    The OutboundMessage to send

    returns

    A akka.dispatch.Future with the OperationResult

    Attributes
    final
    Definition Classes
    HookupClientBroadcastChannelLike
  26. val settings : HookupClientConfig

    The configuration of this client.

    The configuration of this client.

    returns

    The HookupClientConfig as configuration object

    Definition Classes
    DefaultHookupClientHookupClient
  27. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  28. def toString (): String

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

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

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

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from HookupClient

Inherited from Closeable

Inherited from AutoCloseable

Inherited from Reconnectable

Inherited from Connectable

Inherited from HookupClientLike

Inherited from BroadcastChannelLike

Inherited from AnyRef

Inherited from Any