io.backchat.hookup

JavaHookupClient

class JavaHookupClient extends DefaultHookupClient with JavaHelpers

A java friendly websocket

See also

JavaHelpers

,

HookupClient

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. JavaHookupClient
  2. JavaHelpers
  3. WebSocketListener
  4. DefaultHookupClient
  5. HookupClient
  6. Closeable
  7. AutoCloseable
  8. Reconnectable
  9. Connectable
  10. HookupClientLike
  11. BroadcastChannelLike
  12. AnyRef
  13. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new JavaHookupClient (settings: HookupClientConfig)

    settings

    The settings to use when creating this websocket.

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 addListener (listener: WebSocketListener): JavaHookupClient.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

    Definition Classes
    JavaHelpers
  8. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  9. 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
  10. def clone (): AnyRef

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

    Attributes
    final
    Definition Classes
    HookupClient → Closeable → AutoCloseable
  12. 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
  13. 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
  14. def eq (arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  16. 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
  17. def finalize (): Unit

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

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

    Definition Classes
    AnyRef → Any
  20. def isConnected : Boolean

    A flag indicating connection status.

    A flag indicating connection status.

    returns

    a boolean indicating connection status

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

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

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

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

    Attributes
    final
    Definition Classes
    AnyRef
  25. 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
  26. 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
  27. 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
  28. 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
  29. 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
  30. 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
  31. 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
  32. 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
  33. 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

    Definition Classes
    JavaHelpers
  34. def reconnect (): Future[OperationResult]

    Reconnect to the server.

    Reconnect to the server.

    returns

    A akka.dispatch.Future with the OperationResult

    Definition Classes
    HookupClientReconnectable
  35. def removeListener (listener: WebSocketListener): JavaHookupClient.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

    Definition Classes
    JavaHelpers
  36. def send (json: JValue): Future[OperationResult]

    Send a json message.

    Send a json message.

    returns

    A akka.dispatch.Future with the OperationResult

    Definition Classes
    JavaHelpers
  37. 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

    Definition Classes
    JavaHelpers
  38. 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
  39. 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

    Definition Classes
    JavaHelpers
  40. 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

    Definition Classes
    JavaHelpers
  41. 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

    Definition Classes
    JavaHelpers
  42. 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

    Definition Classes
    JavaHelpers
  43. def synchronized [T0] (arg0: ⇒ T0): T0

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

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

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

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

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from JavaHelpers

Inherited from WebSocketListener

Inherited from DefaultHookupClient

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