com.paypal.cascade.examples.http.resource

MyHttpResource

class MyHttpResource extends AbstractResourceActor

MyHttpResource implements the

PartialFunction

to process incoming HTTP requests. Under the hood, it's a plain Akka actor that adds extra utilities (logging, authorization, parsing, etc...) before and after your

resourceReceive

functionality executes. When this actor receives a

ProcessRequest

message, that means that the Content-Type is supported & acceptable, and the request was parsed successfully. After you complete processing, call

complete...

, or

sendError...

to continue processing the request. After you do that, the processing will continue with appending appropriate response headers, handling timeouts, returning to spray, etc... sendError... }}} After you do that, the processing will continue with appending appropriate response headers, handling timeouts, returning to spray, etc... complete... }}} After you do that, the processing will continue with appending appropriate response headers, handling timeouts, returning to spray, etc... PartialFunction }}} requests. Under the hood, it's a plain Akka actor that adds extra utilities (logging, authorization, parsing, etc...) before and after your

resourceReceive

functionality executes. When this actor receives a

ProcessRequest

message, that means that the Content-Type is supported & acceptable, and the request was parsed successfully. After you complete processing, call

complete...

, or

sendError...

to continue processing the request. After you do that, the processing will continue with appending appropriate response headers, handling timeouts, returning to spray, etc... sendError... }}} After you do that, the processing will continue with appending appropriate response headers, handling timeouts, returning to spray, etc... complete... }}} After you do that, the processing will continue with appending appropriate response headers, handling timeouts, returning to spray, etc...

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. MyHttpResource
  2. AbstractResourceActor
  3. HttpResourceActor
  4. ServiceActor
  5. CommonActor
  6. ActorLogging
  7. Actor
  8. AnyRef
  9. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MyHttpResource(ctx: ResourceContext)

    ctx

    the resource context. will be passed by

    ResourceDriver

Type Members

  1. type Receive = PartialFunction[Any, Unit]

    Definition Classes
    Actor
  2. case class RequestIsParsed extends Product with Serializable

    Definition Classes
    HttpResourceActor

Value Members

  1. final def !=(arg0: Any): Boolean

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

    Definition Classes
    AnyRef → Any
  3. def +(other: String): String

    Implicit information
    This member is added by an implicit conversion from MyHttpResource to any2stringadd[MyHttpResource] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (MyHttpResource, B)

    Implicit information
    This member is added by an implicit conversion from MyHttpResource to ArrowAssoc[MyHttpResource] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  6. val acceptableContentTypes: List[ContentType]

    Definition Classes
    HttpResourceActor
  7. def after(resp: HttpResponse): Unit

    Definition Classes
    HttpResourceActor
  8. def aroundPostRestart(reason: Throwable): Unit

    Attributes
    protected[akka]
    Definition Classes
    Actor
  9. def aroundPostStop(): Unit

    Attributes
    protected[akka]
    Definition Classes
    Actor
  10. def aroundPreRestart(reason: Throwable, message: Option[Any]): Unit

    Attributes
    protected[akka]
    Definition Classes
    Actor
  11. def aroundPreStart(): Unit

    Attributes
    protected[akka]
    Definition Classes
    Actor
  12. def aroundReceive(receive: akka.actor.Actor.Receive, msg: Any): Unit

    Attributes
    protected[akka]
    Definition Classes
    Actor
  13. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  14. def before(method: HttpMethod): Unit

    Definition Classes
    HttpResourceActor
  15. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  16. final def complete(resp: HttpResponse, location: String): Unit

    Attributes
    protected
    Definition Classes
    AbstractResourceActor
  17. final def complete(resp: HttpResponse): Unit

    Attributes
    protected
    Definition Classes
    AbstractResourceActor
  18. final def completeToJSON[T](code: StatusCode, response: T, location: String): Unit

    Attributes
    protected
    Definition Classes
    AbstractResourceActor
  19. final def completeToJSON[T](code: StatusCode, response: T): Unit

    Attributes
    protected
    Definition Classes
    AbstractResourceActor
  20. implicit val context: ActorContext

    Definition Classes
    Actor
  21. def ensuring(cond: (MyHttpResource) ⇒ Boolean, msg: ⇒ Any): MyHttpResource

    Implicit information
    This member is added by an implicit conversion from MyHttpResource to Ensuring[MyHttpResource] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  22. def ensuring(cond: (MyHttpResource) ⇒ Boolean): MyHttpResource

    Implicit information
    This member is added by an implicit conversion from MyHttpResource to Ensuring[MyHttpResource] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  23. def ensuring(cond: Boolean, msg: ⇒ Any): MyHttpResource

    Implicit information
    This member is added by an implicit conversion from MyHttpResource to Ensuring[MyHttpResource] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  24. def ensuring(cond: Boolean): MyHttpResource

    Implicit information
    This member is added by an implicit conversion from MyHttpResource to Ensuring[MyHttpResource] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  25. final def eq(arg0: AnyRef): Boolean

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  28. def formatted(fmtstr: String): String

    Implicit information
    This member is added by an implicit conversion from MyHttpResource to StringFormat[MyHttpResource] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  29. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  30. def handleError(exception: Exception): HttpResponse

    Attributes
    protected
    Definition Classes
    HttpResourceActor
  31. def hashCode(): Int

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

    Definition Classes
    Any
  33. def log: LoggingAdapter

    Definition Classes
    ActorLogging
  34. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  37. def postRestart(reason: Throwable): Unit

    Definition Classes
    CommonActor → Actor
  38. def postStop(): Unit

    Definition Classes
    Actor
    Annotations
    @throws( classOf[java.lang.Exception] )
  39. def preRestart(reason: Throwable, message: Option[Any]): Unit

    Definition Classes
    Actor
    Annotations
    @throws( classOf[java.lang.Exception] )
  40. def preStart(): Unit

    Definition Classes
    Actor
    Annotations
    @throws( classOf[java.lang.Exception] )
  41. final def receive: akka.actor.Actor.Receive

    Definition Classes
    AbstractResourceActor → HttpResourceActor → Actor
  42. def resourceReceive: Receive

    Definition Classes
    MyHttpResource → AbstractResourceActor
  43. val responseContentType: ContentType

    Definition Classes
    HttpResourceActor
  44. val responseLanguage: Option[Language]

    Definition Classes
    HttpResourceActor
  45. implicit final val self: ActorRef

    Definition Classes
    Actor
  46. final def sendError(f: Throwable): Unit

    Attributes
    protected
    Definition Classes
    AbstractResourceActor
  47. final def sendErrorCodeResponse(code: StatusCode): Unit

    Attributes
    protected
    Definition Classes
    AbstractResourceActor
  48. final def sendErrorMapResponse(code: StatusCode, msg: String): Unit

    Attributes
    protected
    Definition Classes
    AbstractResourceActor
  49. final def sendErrorResponse[T](code: StatusCode, error: T)(implicit arg0: Manifest[T]): Unit

    Attributes
    protected
    Definition Classes
    AbstractResourceActor
  50. final def sender(): ActorRef

    Definition Classes
    Actor
  51. val supervisorStrategy: OneForOneStrategy

    Definition Classes
    HttpResourceActor → Actor
  52. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  53. def toString(): String

    Definition Classes
    AnyRef → Any
  54. def unhandled(message: Any): Unit

    Definition Classes
    ServiceActor → Actor
    Annotations
    @throws( ... )
  55. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  58. def [B](y: B): (MyHttpResource, B)

    Implicit information
    This member is added by an implicit conversion from MyHttpResource to ArrowAssoc[MyHttpResource] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from AbstractResourceActor

Inherited from HttpResourceActor

Inherited from ServiceActor

Inherited from CommonActor

Inherited from ActorLogging

Inherited from Actor

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from MyHttpResource to any2stringadd[MyHttpResource]

Inherited by implicit conversion StringFormat from MyHttpResource to StringFormat[MyHttpResource]

Inherited by implicit conversion Ensuring from MyHttpResource to Ensuring[MyHttpResource]

Inherited by implicit conversion ArrowAssoc from MyHttpResource to ArrowAssoc[MyHttpResource]

Ungrouped