Object/Trait

com.avsystem.commons.rest

RawRest

Related Docs: trait RawRest | package rest

Permalink

object RawRest extends RawRpcCompanion[RawRest]

Linear Supertypes
RawRpcCompanion[RawRest], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RawRest
  2. RawRpcCompanion
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type AsRawRealRpc[Real] = AsRawReal[RawRest, Real]

    Permalink
    Definition Classes
    RawRpcCompanion
  2. type AsRawRpc[Real] = AsRaw[RawRest, Real]

    Permalink
    Definition Classes
    RawRpcCompanion
  3. type AsRealRpc[Real] = AsReal[RawRest, Real]

    Permalink
    Definition Classes
    RawRpcCompanion
  4. type Async[T] = (Callback[T]) ⇒ Unit

    Permalink

    The most low-level, raw type representing an asynchronous, possibly side-effecting operation that yields a value of type T as a result.

    The most low-level, raw type representing an asynchronous, possibly side-effecting operation that yields a value of type T as a result. Async is a consumer of a callback. When a callback is passed to Async, it should start the operation and ultimately notify the callback about the result. Each time the callback is passed, the entire operation should be repeated, involving all possible side effects. Operation should never be started without the callback being passed (i.e. there should be no observable side effects before a callback is passed). Implementation of Async should also be prepared to accept a callback before the previous one was notified about the result (i.e. it should support concurrent execution).

  5. type Callback[T] = (commons.Try[T]) ⇒ Unit

    Permalink

    A callback that gets notified when value of type T gets computed or when computation of that value fails.

    A callback that gets notified when value of type T gets computed or when computation of that value fails. Callbacks should never throw exceptions. Preferably, they should be simple notifiers that delegate the real work somewhere else, e.g. schedule some handling code on a separate executor (e.g. ExecutionContext).

  6. type HandleRequest = (RestRequest) ⇒ Async[RestResponse]

    Permalink

    Raw type of an operation that executes a RestRequest.

    Raw type of an operation that executes a RestRequest. The operation should be run every time the resulting Async value is passed a callback. It should not be run before that. Each run may involve side effects, network communication, etc. Runs may be concurrent. Request handlers should never throw exceptions but rather convert them into failing implementation of Async. One way to do this is by wrapping the handler with safeHandle.

  7. type HandleResolvedRequest = (RestRequest, ResolvedCall) ⇒ Async[RestResponse]

    Permalink

    Similar to HandleRequest but accepts already resolved path as a second argument.

Value Members

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. def asHandleRequest[Real](real: Real)(implicit arg0: AsRawRpc[Real], arg1: RestMetadata[Real]): HandleRequest

    Permalink
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def asRaw[Real](real: Real)(implicit asRawRpc: AsRawRpc[Real]): RawRest

    Permalink
    Definition Classes
    RawRpcCompanion
  7. def asReal[Real](raw: RawRest)(implicit asRealRpc: AsRealRpc[Real]): Real

    Permalink
    Definition Classes
    RawRpcCompanion
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def contramapCallback[A, B](callback: Callback[B])(f: (A) ⇒ B): Callback[A]

    Permalink
  10. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  12. def failingAsync[T](cause: Throwable): Async[T]

    Permalink
  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. def fromHandleRequest[Real](handleRequest: HandleRequest)(implicit arg0: AsRealRpc[Real], arg1: RestMetadata[Real]): Real

    Permalink
  15. final def getClass(): Class[_]

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

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

    Permalink
    Definition Classes
    Any
  18. def mapAsync[A, B](async: Async[A])(f: (A) ⇒ B): Async[B]

    Permalink
  19. macro def materializeAsRaw[Real]: AsRawRpc[Real]

    Permalink
    Definition Classes
    RawRpcCompanion
  20. macro def materializeAsRawReal[Real]: AsRawRealRpc[Real]

    Permalink
    Definition Classes
    RawRpcCompanion
  21. macro def materializeAsReal[Real]: AsRealRpc[Real]

    Permalink
    Definition Classes
    RawRpcCompanion
  22. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  25. def readyAsync[T](result: commons.Try[T]): Async[T]

    Permalink
  26. def resolveAndHandle(metadata: RestMetadata[_])(handleResolved: HandleResolvedRequest): HandleRequest

    Permalink
  27. def safeAsync[T](async: ⇒ Async[T]): Async[T]

    Permalink
  28. def safeHandle(handleRequest: HandleRequest): HandleRequest

    Permalink

    Ensures that all possible exceptions thrown by a request handler are not propagated but converted into an instance of Async that notifies its callbacks about the failure.

  29. def successfulAsync[T](value: T): Async[T]

    Permalink
  30. final def synchronized[T0](arg0: ⇒ T0): T0

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from RawRpcCompanion[RawRest]

Inherited from AnyRef

Inherited from Any

Ungrouped