play.sockjs.api

SockJSRouter

object SockJSRouter

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. SockJSRouter
  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 Builder extends Product with Serializable

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 acceptWithActor[In, Out](f: (RequestHeader) ⇒ (ActorRef) ⇒ Props)(implicit in: MessageFormatter[In], out: MessageFormatter[Out], app: api.Application, outMessageType: ClassTag[Out]): SockJSRouter

    Create a SockJS router that will pass messages to/from the actor created by the given props.

    Create a SockJS router that will pass messages to/from the actor created by the given props.

    Given a request and an actor ref to send messages to, the function passed should return the props for an actor to create to handle this SockJS connection.

    For example:

    lazy val sockjs = SockJSRouter.acceptWithActor[JsValue, JsValue] { req => out =>
    MySockJSActor.props(out)
    }
  7. def adapter[A](f: (RequestHeader) ⇒ Enumeratee[A, A])(implicit formatter: MessageFormatter[A]): SockJSRouter

    Create a SockJS router that will adapt the incoming stream and send it back out.

  8. def apply(server: SockJSServer): Builder

    Creates a SockJS router with the given server

  9. def apply(f: (SockJSSettings) ⇒ SockJSSettings): Builder

    Creates a SockJS router with default server and a function to modify the default settings

  10. def apply(settings: SockJSSettings): Builder

    Creates a SockJS router with default server and given settings

  11. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  12. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  13. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  15. def finalize(): Unit

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

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

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

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

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

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

    Definition Classes
    AnyRef
  22. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  23. def toString(): String

    Definition Classes
    AnyRef → Any
  24. def tryAccept[A](f: (RequestHeader) ⇒ Future[Either[Result, (Iteratee[A, _], Enumerator[A])]])(implicit formatter: MessageFormatter[A]): SockJSRouter

    Creates a SockJS router that will either reject the connection with the given result, or will be handled by the given inbound and outbound channels, asynchronously

  25. def tryAcceptWithActor[In, Out](f: (RequestHeader) ⇒ Future[Either[Result, (ActorRef) ⇒ Props]])(implicit in: MessageFormatter[In], out: MessageFormatter[Out], app: api.Application, outMessageType: ClassTag[Out]): SockJSRouter

    Create a SockJS router that will pass messages to/from the actor created by the given props asynchronously.

    Create a SockJS router that will pass messages to/from the actor created by the given props asynchronously.

    Given a request, this method should return a future of either:

    - A result to reject the WebSocket with, or - A function that will take the sending actor, and create the props that describe the actor to handle this SockJS connection

    For example:

    lazy val sockjs = SockJSRouter.acceptWithActor[JsValue, JsValue] { req =>
    val isAuthenticated: Future[Boolean] = authenticate(req)
    val isAuthenticated.map {
      case false => Left(Forbidden)
      case true => Right(MySockJSActor.props)
    }
    }
  26. def using[A](f: (RequestHeader) ⇒ (Iteratee[A, _], Enumerator[A]))(implicit formatter: MessageFormatter[A]): SockJSRouter

    Create a SockJS router that accepts a SockJS connection using the given inbound/outbound channels.

  27. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def async[A](f: (RequestHeader) ⇒ Future[(Iteratee[A, _], Enumerator[A])])(implicit formatter: MessageFormatter[A]): SockJSRouter

    Create a SockJS router that accepts a connection using the given inbound/outbound channels asynchronously.

    Create a SockJS router that accepts a connection using the given inbound/outbound channels asynchronously.

    Annotations
    @deprecated
    Deprecated

    (Since version 0.3) Use SockJSRouter.tryAccept instead

Inherited from AnyRef

Inherited from Any

Ungrouped