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 any2stringfmt
  3. by any2ArrowAssoc
  4. by any2Ensuring
  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: AnyRef): Boolean

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

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

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

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

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

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

    Definition Classes
    Any
  8. val acceptableContentTypes: List[ContentType]

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

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

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

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

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

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

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

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

    Definition Classes
    HttpResourceActor
  17. def clone(): AnyRef

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

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

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

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

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

    Definition Classes
    Actor
  23. 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 any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  24. def ensuring(cond: (MyHttpResource) ⇒ Boolean): MyHttpResource

    Implicit information
    This member is added by an implicit conversion from MyHttpResource to Ensuring[MyHttpResource] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  25. 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 any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  26. def ensuring(cond: Boolean): MyHttpResource

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

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

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

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

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

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

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

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

    Definition Classes
    Any
  35. def log: LoggingAdapter

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

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

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

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

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

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

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

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

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

    Definition Classes
    MyHttpResource → AbstractResourceActor
  45. val responseContentType: ContentType

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

    Definition Classes
    HttpResourceActor
  47. implicit final val self: ActorRef

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

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

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

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

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

    Definition Classes
    Actor
  53. val supervisorStrategy: OneForOneStrategy

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

    Definition Classes
    AnyRef
  55. def toString(): String

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

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

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

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

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

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

Shadowed Implicit Value Members

  1. val self: Any

    Implicit information
    This member is added by an implicit conversion from MyHttpResource to StringAdd performed by method any2stringadd in scala.Predef.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (myHttpResource: StringAdd).self
    Definition Classes
    StringAdd
  2. val self: Any

    Implicit information
    This member is added by an implicit conversion from MyHttpResource to StringFormat performed by method any2stringfmt in scala.Predef.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (myHttpResource: StringFormat).self
    Definition Classes
    StringFormat

Deprecated Value Members

  1. def x: MyHttpResource

    Implicit information
    This member is added by an implicit conversion from MyHttpResource to ArrowAssoc[MyHttpResource] performed by method any2ArrowAssoc in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (myHttpResource: ArrowAssoc[MyHttpResource]).x
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use leftOfArrow instead

  2. def x: MyHttpResource

    Implicit information
    This member is added by an implicit conversion from MyHttpResource to Ensuring[MyHttpResource] performed by method any2Ensuring in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (myHttpResource: Ensuring[MyHttpResource]).x
    Definition Classes
    Ensuring
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use resultOfEnsuring instead

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 StringAdd

Inherited by implicit conversion any2stringfmt from MyHttpResource to StringFormat

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

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

Ungrouped