io.backchat

hookup

package hookup

The package object for the library. This contains some implicit conversions to smooth the api over and allow for a single import at the top of a file to get the api working.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. hookup
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. case class AckFailed(message: OutboundMessage) extends InboundMessage with Product with Serializable

    A callback event signaling failure of an ack request.

  2. trait Ackable extends AnyRef

    Adds acking support to a message This can only be included in a websocket out message

  3. trait BackupBuffer extends Closeable

    Interface trait to which fallback mechanisms must adhere to It implements java.io.Closeable so you can use it as a resource

  4. case class BinaryMessage(content: Array[Byte]) extends ProtocolMessage[Array[Byte]] with Product with Serializable

    A message representing an array of bytes sent to/received from a remote party.

  5. trait BroadcastChannel extends BroadcastChannelLike

    A broadcast channel represents a connection

  6. trait BroadcastChannelLike extends AnyRef

    Broadcast channel like is either a connection or a proxy for a connection.

  7. trait Connectable extends AnyRef

    A trait describing a client that can connect to something

  8. case class ContentCompression(level: Int = 6) extends ServerCapability with Product with Serializable

    Configuration for content compression

  9. abstract class DefaultHookupClient extends HookupClient

    Usage of the simple websocket client:

  10. case class Disconnected(cause: Option[Throwable]) extends InboundMessage with Product with Serializable

    A callback event signaling that the connection has ended, if the cause was an exception thrown then the cause object will be filled in.

  11. case class Error(cause: Option[Throwable]) extends InboundMessage with Product with Serializable

    A callback event signaling that an error has occurred.

  12. case class Favico(path: File) extends ServerCapability with Product with Serializable

    The file to use as favico.

  13. class FileBuffer extends BackupBuffer

    The default file buffer.

  14. case class FlashPolicy(domain: String, ports: Seq[Int]) extends ServerCapability with Product with Serializable

    The configuration for the flash policy xml

  15. trait HookupClient extends HookupClientLike with Connectable with Reconnectable with Closeable

    The Hookup client provides a client for the hookup server, it doesn't lock you in to using a specific message format.

  16. case class HookupClientConfig(uri: URI, version: WebSocketVersion = ..., initialHeaders: Map[String, String] = ..., protocols: Seq[WireFormat] = ..., defaultProtocol: WireFormat = ..., pinging: Timeout = ..., buffer: Option[BackupBuffer] = scala.None, throttle: Throttle = NoThrottle, executionContext: ExecutionContext = HookupClient.executionContext) extends Product with Serializable

    The configuration of a websocket client.

  17. trait HookupClientLike extends BroadcastChannelLike

    A trait describing an entity that can handle inbound messages

  18. class HookupServer extends Server

    Netty based HookupServer requires netty 3.

  19. type HookupServerClient = hookup.HookupServer.HookupServerClient

    Type forwarder for a websocket server client

  20. sealed trait InboundMessage extends AnyRef

    A marker trait for inbound messages

  21. case class IndefiniteThrottle(delay: Duration, maxWait: Duration) extends Throttle with Product with Serializable

    Represents a back off strategy that will retry forever when the maximum wait has been reached From then on it will continue to use the max wait as delay.

  22. trait JavaHelpers extends WebSocketListener

    A mixin for a io.backchat.hookup.HookupClient with helper methods for the java api.

  23. class JavaHookupClient extends DefaultHookupClient with JavaHelpers

    A java friendly websocket

  24. case class JsonMessage(content: JValue) extends ProtocolMessage[JValue] with Product with Serializable

    A message representing a json object sent to/received from a remote party.

  25. class JsonProtocolWireFormat extends WireFormat

    A protocol that supports all the features of the websocket server.

  26. case class MaxFrameSize(size: Long = scala.Long.MaxValue) extends ServerCapability with Product with Serializable

    The maximum frame size for a websocket connection

  27. case class MaxTimesThrottle(delay: Duration, maxWait: Duration, maxTimes: Int = 1) extends Throttle with Product with Serializable

    Represents a back off strategy that will retry for maxTimes when the maximum wait has been reached When it can't connect within the maxTimes a maxValue can occur it will return a io.backchat.hookup.NoThrottle strategy

  28. class MemoryBuffer extends BackupBuffer

  29. sealed trait OperationResult extends AnyRef

    The interface to represent a result from an operation These results can indicate Success, Cancellation or a sequence of operation results

  30. sealed trait OutboundMessage extends AnyRef

    A marker trait for outbound messages

  31. case class Ping(timeout: Timeout) extends ServerCapability with Product with Serializable

    The configuration for sending pings to a client.

  32. trait ProtocolMessage[T] extends InboundMessage with OutboundMessage with Ackable

    A base trait for creating messages of different content types

  33. case class PublicDirectory(path: File) extends ServerCapability with Product with Serializable

    The directory to use as a base directory for serving static files.

  34. trait Reconnectable extends AnyRef

    A trait describing a client that can reconnect to a server.

  35. case class ResultList(results: List[OperationResult]) extends OperationResult with Product with Serializable

    A list of operation results, contains some aggregate helper methods in addition to a populated list of children

  36. class ScalaUpstreamHandler extends AnyRef

  37. trait Server extends AnyRef

    A trait to wrap a server in so it can be used by components that depend on a most basic interfae.

  38. trait ServerCapability extends AnyRef

    A marker trait to indicate something is a a configuration for the server.

  39. case class ServerInfo(name: String = ServerInfo.DefaultServerName, version: String = BuildInfo.version, listenOn: String = "0.0.0.0", port: Int = 8765, defaultProtocol: String = ..., capabilities: Seq[ServerCapability] = collection.this.Seq.empty[Nothing], executionContext: ExecutionContext = HookupClient.executionContext) extends Product with Serializable

    Main configuration object for a server

  40. class SimpleJsonWireFormat extends WireFormat

    A protocol format that is just plain and simple json.

  41. case class SslSupport(keystorePath: String = ..., keystorePassword: String = ..., algorithm: String = ...) extends ServerCapability with Product with Serializable

    Configuration for adding ssl support to the server

  42. case class SubProtocols(protocol: WireFormat, protocols: WireFormat*) extends ServerCapability with Product with Serializable

    The subprotocols this server can respond to.

  43. case class TextMessage(content: String) extends ProtocolMessage[String] with Product with Serializable

    A message representing a text object sent to/received from a remote party.

  44. trait Throttle extends AnyRef

    The interface for an immutable backoff schedule

  45. trait WebSocketListener extends AnyRef

    A base class for the java api to listen for websocket events.

  46. trait WireFormat extends AnyRef

    The interface trait for a wire format.

Value Members

  1. object BuildInfo extends Product with Serializable

    This object was generated by sbt-buildinfo.

  2. object Cancelled extends OperationResult with Product with Serializable

    An object indicating a failure result

  3. object Connected extends InboundMessage with Product with Serializable

    A callback event signaling that the connection has been fully established.

  4. var DefaultProtocol: String

    The default protocol for the hookup server to use.

    The default protocol for the hookup server to use. By default this a simple json protocol that doesn't support any advanced features but just sends json messages back and forth

  5. val DefaultProtocols: Seq[WireFormat]

    The default protocols hookup understands

  6. object FileBuffer

    Companion object for the io.backchat.hookup.FileBuffer

  7. object HookupClient

  8. object HookupServer

  9. val HttpCacheSeconds: Int

  10. val HttpDateFormat: DateTimeFormatter

  11. val HttpDateGMT: String

  12. val HttpDateTimeZone: DateTimeZone

  13. val JsonProtocol: JsonProtocolWireFormat

  14. object JsonProtocolWireFormat

  15. object NoThrottle extends Throttle with Product with Serializable

    A Null object representing no backing off at all

  16. object Reconnecting extends InboundMessage with Product with Serializable

    A callback event signaling that the connection to the server has been broken and the client is trying to reconnect.

  17. object ServerInfo extends Serializable

  18. val SimpleJson: SimpleJsonWireFormat

  19. object Success extends OperationResult with Product with Serializable

    An object indicating a success result

  20. implicit def channelFutureToAkkaFuture(fut: ChannelFuture): AnyRef { def toAkkaFuture(implicit context: scala.concurrent.ExecutionContext): scala.concurrent.Promise[io.backchat.hookup.OperationResult] }

    An implicit conversion from a org.jboss.netty.channel.ChannelFuture to an scala.concurrent.Future

    An implicit conversion from a org.jboss.netty.channel.ChannelFuture to an scala.concurrent.Future

    fut

    The org.jboss.netty.channel.ChannelFuture

    returns

    A scala.concurrent.Future

  21. package examples

  22. implicit def fn2BroadcastFilter(fn: (BroadcastChannel) ⇒ Boolean): BroadcastFilter

    An implicit conversion from a predicate function that takes a io.backchat.hookup.BroadcastChannel to a io.backchat.hookup.HookupServer.BroadcastFilter

    An implicit conversion from a predicate function that takes a io.backchat.hookup.BroadcastChannel to a io.backchat.hookup.HookupServer.BroadcastFilter

    fn

    The predicate function to convert to a filter

    returns

    A io.backchat.hookup.HookupServer.BroadcastFilter

  23. def getDefaultProtocol(): String

  24. def getDefaultProtocols(): Seq[WireFormat]

  25. package http

  26. implicit def jvalue2JsonMessage(content: JValue): OutboundMessage with Ackable

    Implicit conversion from a json4s jvalue to a io.backchat.hookup.JsonMessage

    Implicit conversion from a json4s jvalue to a io.backchat.hookup.JsonMessage

    content

    The string content of the message

    returns

    A io.backchat.hookup.JsonMessage

  27. package server

  28. def setDefaultProtocol(arg0: String): Unit

    The default protocol for the hookup server to use.

    The default protocol for the hookup server to use. By default this a simple json protocol that doesn't support any advanced features but just sends json messages back and forth

Inherited from AnyRef

Inherited from Any

Ungrouped