io.backchat.hookup

JavaHelpers

trait JavaHelpers extends WebSocketListener

A mixin for a io.backchat.hookup.HookupClient with helper methods for the java api. When mixed into a websocket it is a full implementation that notifies the registered io.backchat.hookup.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. JavaHelpers
  2. WebSocketListener
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

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. def addListener(listener: WebSocketListener): JavaHelpers.this

    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 io.backchat.hookup.WebSocketListener to add

    returns

    this to allow for chaining

  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  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( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]

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

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

    Definition Classes
    Any
  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 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

    reason

    The message it received the throwable if any, otherwise null

    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

    json

    The message it received

    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

    Remove a listener for websocket events

    Remove a listener for websocket events

    listener

    The io.backchat.hookup.WebSocketListener to add

    returns

    this to allow for chaining

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

    Send a json message.

    Send a json message. json

    json

    The message to send.

    returns

    A scala.concurrent.Future with the io.backchat.hookup.OperationResult

  29. 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 org.json4s.ParserUtil.ParseException

    message

    The message to send.

    timeout

    the scala.concurrent.duration.Duration as timeout for the ack operation

    returns

    A scala.concurrent.Future with the io.backchat.hookup.OperationResult

  30. 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 scala.concurrent.duration.Duration as timeout for the ack operation

    returns

    A scala.concurrent.Future with the io.backchat.hookup.OperationResult

  31. 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 org.json4s.ParserUtil.ParseException

    json

    The message to send.

    returns

    A scala.concurrent.Future with the io.backchat.hookup.OperationResult

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

    json

    The message to send.

    timeout

    the scala.concurrent.duration.Duration as timeout for the ack operation

    returns

    A scala.concurrent.Future with the io.backchat.hookup.OperationResult

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

    Definition Classes
    AnyRef
  34. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from WebSocketListener

Inherited from AnyRef

Inherited from Any

Ungrouped