io.backchat.hookup

JavaHookupClient

class JavaHookupClient extends DefaultHookupClient with JavaHelpers

A java friendly websocket

See also

io.backchat.hookup.JavaHelpers

io.backchat.hookup.HookupClient

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  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
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new JavaHookupClient(settings: HookupClientConfig)

    settings

    The settings to use when creating this websocket.

Value Members

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

    Send a message to the server.

    Send a message to the server.

    message

    The io.backchat.hookup.OutboundMessage to send

    returns

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

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

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

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

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

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

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

    returns

    this to allow for chaining

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

    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[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. final def close(): Unit

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

    Connect to the server.

    Connect to the server.

    returns

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

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

    Disconnect from the server.

    Disconnect from the server.

    returns

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

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

    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 scala.concurrent.ExecutionContext

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

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

    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. final def isInstanceOf[T0]: Boolean

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

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

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

    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

    reason

    The message it received the throwable if any, otherwise null

    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

    json

    The message it received

    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 scala.concurrent.Future with the io.backchat.hookup.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 io.backchat.hookup.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. json

    json

    The message to send.

    returns

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

    Definition Classes
    JavaHelpers
  37. final def send(message: String): Future[OperationResult]

    Definition Classes
    HookupClient
  38. final def send(message: OutboundMessage): Future[OperationResult]

    Send a message to the server.

    Send a message to the server.

    message

    The io.backchat.hookup.OutboundMessage to send

    returns

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

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

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

    returns

    A scala.concurrent.Future with the io.backchat.hookup.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 org.json4s.ParserUtil.ParseException

    json

    The message to send.

    returns

    A scala.concurrent.Future with the io.backchat.hookup.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

    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

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

    Definition Classes
    AnyRef
  44. def toString(): String

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

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

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

    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

Ungrouped