Class

io.backchat.hookup

JavaHookupClient

Related Doc: package hookup

Permalink

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
Visibility
  1. Public
  2. All

Instance Constructors

  1. new JavaHookupClient(settings: HookupClientConfig)

    Permalink

    settings

    The settings to use when creating this websocket.

Value Members

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

    Permalink

    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: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  5. def addListener(listener: WebSocketListener): JavaHookupClient.this.type

    Permalink

    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
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def buffered: Boolean

    Permalink

    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
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. final def close(): Unit

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

    Permalink

    Connect to the server.

    Connect to the server.

    returns

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

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

    Permalink

    Disconnect from the server.

    Disconnect from the server.

    returns

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

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

    Permalink
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean

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

    Permalink

    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
  15. def finalize(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  18. def isConnected: Boolean

    Permalink

    A flag indicating connection status.

    A flag indicating connection status.

    returns

    a boolean indicating connection status

    Definition Classes
    HookupClientConnectable
  19. final def isInstanceOf[T0]: Boolean

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

    Permalink
    Definition Classes
    AnyRef
  21. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  23. def onConnected(client: HookupClient): Unit

    Permalink

    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
  24. def onDisconnected(client: HookupClient, reason: Throwable): Unit

    Permalink

    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
  25. def onError(client: HookupClient, reason: Throwable): Unit

    Permalink

    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
  26. def onJsonAckFailed(client: HookupClient, json: String): Unit

    Permalink

    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
  27. def onJsonMessage(client: HookupClient, json: String): Unit

    Permalink

    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
  28. def onReconnecting(client: HookupClient): Unit

    Permalink

    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
  29. def onTextAckFailed(client: HookupClient, text: String): Unit

    Permalink

    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
  30. def onTextMessage(client: HookupClient, text: String): Unit

    Permalink

    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
  31. def receive: Receive

    Permalink

    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
  32. def reconnect(): Future[OperationResult]

    Permalink

    Reconnect to the server.

    Reconnect to the server.

    returns

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

    Definition Classes
    HookupClientReconnectable
  33. def removeListener(listener: WebSocketListener): JavaHookupClient.this.type

    Permalink

    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
  34. def send(json: JValue): Future[OperationResult]

    Permalink

    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
  35. final def send(message: String): Future[OperationResult]

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

    Permalink

    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
  37. def sendAcked(message: JValue, timeout: Duration): Future[OperationResult]

    Permalink

    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
  38. def sendAcked(message: String, timeout: Duration): Future[OperationResult]

    Permalink

    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
  39. def sendJson(json: String): Future[OperationResult]

    Permalink

    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
  40. def sendJsonAcked(json: String, timeout: Duration): Future[OperationResult]

    Permalink

    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
  41. val settings: HookupClientConfig

    Permalink

    The configuration of this client.

    The configuration of this client.

    returns

    The io.backchat.hookup.HookupClientConfig as configuration object

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

    Permalink
    Definition Classes
    AnyRef
  43. def toString(): String

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

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

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

    Permalink
    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