io.backchat.hookup

JavaHelpers

trait JavaHelpers extends WebSocketListener

A mixin for a HookupClient with helper methods for the java api. When mixed into a websocket it is a full implementation that notifies the registered WebSocketListener instances when events occur.

Self Type
JavaHelpers with HookupClient
Linear Supertypes
WebSocketListener, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. JavaHelpers
  2. WebSocketListener
  3. AnyRef
  4. Any
Visibility
  1. Public
  2. All

Value Members

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

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

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

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

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

    Attributes
    final
    Definition Classes
    Any
  6. def addListener (listener: WebSocketListener): JavaHelpers.this.type

    Add a listener for websocket events, if you want to remove the listener at a later time you need to keep the instance around.

    Add a listener for websocket events, if you want to remove the listener at a later time you need to keep the instance around.

    listener

    The WebSocketListener to add

    returns

    this to allow for chaining

  7. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  8. def clone (): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  9. def eq (arg0: AnyRef): Boolean

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

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

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

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

    Definition Classes
    AnyRef → Any
  14. def isInstanceOf [T0] : Boolean

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

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

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

    Attributes
    final
    Definition Classes
    AnyRef
  18. def onConnected (client: HookupClient): Unit

    The callback method for when the client is connected

    The callback method for when the client is connected

    client

    The client that connected.

    Definition Classes
    WebSocketListener
  19. def onDisconnected (client: HookupClient, reason: Throwable): Unit

    The callback method for when the client is disconnected

    The callback method for when the client is disconnected

    client

    The client that disconnected.

    Definition Classes
    WebSocketListener
  20. def onError (client: HookupClient, reason: Throwable): Unit

    The callback method for when an error has occured

    The callback method for when an error has occured

    client

    The client that received the message

    Definition Classes
    WebSocketListener
  21. def onJsonAckFailed (client: HookupClient, json: String): Unit

    The callback method for when a json message has failed to be acknowledged.

    The callback method for when a json message has failed to be acknowledged.

    client

    The client that received the message

    Definition Classes
    WebSocketListener
  22. def onJsonMessage (client: HookupClient, json: String): Unit

    The callback method for when a json message has been received.

    The callback method for when a json message has been received.

    client

    The client that received the message

    json

    The message it received

    Definition Classes
    WebSocketListener
  23. def onReconnecting (client: HookupClient): Unit

    The callback method for when the client is reconnecting

    The callback method for when the client is reconnecting

    client

    The client that is reconnecting.

    Definition Classes
    WebSocketListener
  24. def onTextAckFailed (client: HookupClient, text: String): Unit

    The callback method for when a text message has failed to be acknowledged.

    The callback method for when a text message has failed to be acknowledged.

    client

    The client that received the message

    text

    The message it received

    Definition Classes
    WebSocketListener
  25. def onTextMessage (client: HookupClient, text: String): Unit

    The callback method for when a text message has been received.

    The callback method for when a text message has been received.

    client

    The client that received the message

    text

    The message it received

    Definition Classes
    WebSocketListener
  26. def receive : Receive

    The implementation of the receive handler for java clients.

    The implementation of the receive handler for java clients. it notfies the listeners by iterating over all of them and calling the designated method.

    returns

    The io.backchat.hookup.HookupClient.Receive message handler

  27. def removeListener (listener: WebSocketListener): JavaHelpers.this.type

    Remove a listener for websocket events

    Remove a listener for websocket events

    listener

    The WebSocketListener to add

    returns

    this to allow for chaining

  28. def send (json: JValue): Future[OperationResult]

    Send a json message.

    Send a json message.

    returns

    A akka.dispatch.Future with the OperationResult

  29. def send (message: String): Future[OperationResult]

    Send a text message.

    Send a text message. If the message is a json string it will still be turned into a json message

    message

    The message to send.

    returns

    A akka.dispatch.Future with the OperationResult

  30. def sendAcked (message: JValue, timeout: Duration): Future[OperationResult]

    Send a json message which expects an Ack.

    Send a json message which expects an Ack. If the message isn't a json string it will throw a net.liftweb.json.JsonParser.ParseException

    message

    The message to send.

    timeout

    the akka.util.Duration as timeout for the ack operation

    returns

    A akka.dispatch.Future with the OperationResult

  31. def sendAcked (message: String, timeout: Duration): Future[OperationResult]

    Send a text message which expects an Ack.

    Send a text message which expects an Ack. If the message is a json string it will still be turned into a json message

    message

    The message to send.

    timeout

    the akka.util.Duration as timeout for the ack operation

    returns

    A akka.dispatch.Future with the OperationResult

  32. def sendJson (json: String): Future[OperationResult]

    Send a json message.

    Send a json message. If the message isn't a json string it will throw a net.liftweb.json.JsonParser.ParseException

    returns

    A akka.dispatch.Future with the OperationResult

  33. def sendJsonAcked (json: String, timeout: Duration): Future[OperationResult]

    Send a text message which expects an Ack.

    Send a text message which expects an Ack. If the message is a json string it will still be turned into a json message

    timeout

    the akka.util.Duration as timeout for the ack operation

    returns

    A akka.dispatch.Future with the OperationResult

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

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

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

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

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

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from WebSocketListener

Inherited from AnyRef

Inherited from Any