com.m3.octoparts.ws

OctoClient

Related Doc: package ws

class OctoClient extends OctoClientLike

Default Octoparts OctoClientLike implementation

Has a rescuer method that tries its best to recover from all reasonable errors.

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

Instance Constructors

  1. new OctoClient(baseUrl: String, clientTimeout: FiniteDuration, extraWait: FiniteDuration = 50.milliseconds)(implicit octoPlayApp: Application)

    baseUrl

    The base URL of the Octoparts service you would like to hit with the instantiated client

    clientTimeout

    The (HTTP) timeout that you would like this client to use. Note that sending AggregateRequest will result in using the max of this parameter and the timeout on the request (if it exists)

    extraWait

    Extra margin of wait time for timeouts. Defaults to 50 milliseconds.

Value Members

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

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

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

    Definition Classes
    AnyRef → Any
  4. object InvalidateCache extends PlaceHoldersUrl with Product with Serializable

    Attributes
    protected[com.m3.octoparts.ws]
    Definition Classes
    OctoClientLike
  5. object InvalidateCacheFor extends PlaceHoldersUrl with Product with Serializable

    Attributes
    protected[com.m3.octoparts.ws]
    Definition Classes
    OctoClientLike
  6. object InvalidateCacheGroup extends PlaceHoldersUrl with Product with Serializable

    Attributes
    protected[com.m3.octoparts.ws]
    Definition Classes
    OctoClientLike
  7. object InvalidateCacheGroupFor extends PlaceHoldersUrl with Product with Serializable

    Attributes
    protected[com.m3.octoparts.ws]
    Definition Classes
    OctoClientLike
  8. object Invoke extends NoPlaceholdersUrl with Product with Serializable

    Attributes
    protected[com.m3.octoparts.ws]
    Definition Classes
    OctoClientLike
  9. object ListEndpoints extends NoPlaceholdersUrl with Product with Serializable

    Attributes
    protected[com.m3.octoparts.ws]
    Definition Classes
    OctoClientLike
  10. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  11. val baseUrl: String

    The base URL of the Octoparts service you would like to hit with the instantiated client

    The base URL of the Octoparts service you would like to hit with the instantiated client

    Definition Classes
    OctoClientOctoClientLike
  12. def buildAggReq(reqMeta: RequestMeta, partReqs: Seq[PartRequest]): AggregateRequest

    Builds an com.m3.octoparts.model.AggregateRequest using com.m3.octoparts.model.RequestMeta and a list of com.m3.octoparts.model.PartRequest

    Builds an com.m3.octoparts.model.AggregateRequest using com.m3.octoparts.model.RequestMeta and a list of com.m3.octoparts.model.PartRequest

    You may wish to (abstract) override this if you have you have your own requirements for pulling shared data from com.m3.octoparts.model.RequestMeta into your com.m3.octoparts.model.PartRequests

    Attributes
    protected
    Definition Classes
    OctoClientLike
  13. def cacheApiBaseUrl(baseUrl: String): String

    Returns a base URL for the Cache-related APIs

    Returns a base URL for the Cache-related APIs

    Attributes
    protected
    Definition Classes
    OctoClientLike
  14. val clientTimeout: FiniteDuration

    The (HTTP) timeout that you would like this client to use.

    The (HTTP) timeout that you would like this client to use. Note that sending AggregateRequest will result in using the max of this parameter and the timeout on the request (if it exists)

    Attributes
    protected
    Definition Classes
    OctoClientOctoClientLike
  15. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  16. def dropTrailingSlash(s: String): String

    Drops the final forward slash from a string if it exists.

    Drops the final forward slash from a string if it exists.

    As far as I can see, this does not use any Regexp..

    Attributes
    protected
    Definition Classes
    OctoClientLike
  17. def emptyPostOk(url: String)(implicit ec: ExecutionContext): Future[Boolean]

    Does a POST with empty content to the given URL and maps the response to true if the response status is less than 400 or false otherwise

    Does a POST with empty content to the given URL and maps the response to true if the response status is less than 400 or false otherwise

    Definition Classes
    OctoClientLike
  18. def emptyReqResponse: AggregateResponse

    Generates a default dumb/empty com.m3.octoparts.model.AggregateResponse.

    Generates a default dumb/empty com.m3.octoparts.model.AggregateResponse.

    Attributes
    protected
    Definition Classes
    OctoClientLike
  19. def endpointsApiBaseUrl(baseUrl: String): String

    Returns a base URL for the Endpoint APIs

    Returns a base URL for the Endpoint APIs

    Attributes
    protected
    Definition Classes
    OctoClientLike
  20. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  22. val extraWait: FiniteDuration

    Extra margin of wait time for timeouts.

    Extra margin of wait time for timeouts. Defaults to 50 milliseconds.

    Attributes
    protected
  23. def finalize(): Unit

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

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

    Definition Classes
    AnyRef → Any
  26. def invalidateCache(partId: String)(implicit ec: ExecutionContext): Future[Boolean]

    Invalidates cache for a single part

    Invalidates cache for a single part

    Definition Classes
    OctoClientLike
  27. def invalidateCacheFor(partId: String, paramName: String, paramValue: String)(implicit ec: ExecutionContext): Future[Boolean]

    Invalidates a region of the cache for a single part.

    Invalidates a region of the cache for a single part. If the part does not exist, returns true anyways.

    Definition Classes
    OctoClientLike
  28. def invalidateCacheGroup(groupName: String)(implicit ec: ExecutionContext): Future[Boolean]

    Invalidates a group of caches If the group does not exist, returns false.

    Invalidates a group of caches If the group does not exist, returns false.

    Definition Classes
    OctoClientLike
  29. def invalidateCacheGroupFor(groupName: String, paramValue: String)(implicit ec: ExecutionContext): Future[Boolean]

    Invalidates a region for a group of caches If the group does not exist, returns false.

    Invalidates a region for a group of caches If the group does not exist, returns false.

    Definition Classes
    OctoClientLike
  30. def invoke[A](obj: A, partReqs: Seq[PartRequest], headers: (String, String)*)(implicit reqMetaBuilder: RequestMetaBuilder[A], ec: ExecutionContext): Future[AggregateResponse]

    Returns a Futurecom.m3.octoparts.model.AggregateResponse received from asynchronously invoking Octoparts using the provided argument object, and com.m3.octoparts.model.PartRequest list.

    Returns a Futurecom.m3.octoparts.model.AggregateResponse received from asynchronously invoking Octoparts using the provided argument object, and com.m3.octoparts.model.PartRequest list.

    A RequestMetaBuilder type class instance for the first argument must be in scope at the call-site.

    obj

    Object of type A to build a request meta with

    partReqs

    Part requests

    headers

    Optional set of headers that you can send with this request, defaults to none.

    Definition Classes
    OctoClientLike
  31. def invoke(aggReq: AggregateRequest, headers: (String, String)*)(implicit ec: ExecutionContext): Future[AggregateResponse]

    Returns a Futurecom.m3.octoparts.model.AggregateResponse received from asynchronously invoking Octoparts using the provided com.m3.octoparts.model.AggregateRequest

    Returns a Futurecom.m3.octoparts.model.AggregateResponse received from asynchronously invoking Octoparts using the provided com.m3.octoparts.model.AggregateRequest

    aggReq

    AggregateRequest

    headers

    Optional set of headers that you can send with this request, defaults to none.

    Definition Classes
    OctoClientLike
  32. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  33. def listEndpoints(partIds: String*)(implicit ec: ExecutionContext): Future[Seq[HttpPartConfig]]

    Returns a Future Seqcom.m3.octoparts.model.config.json.HttpPartConfig, which describes all the endpoints registered to the Octoparts service.

    Returns a Future Seqcom.m3.octoparts.model.config.json.HttpPartConfig, which describes all the endpoints registered to the Octoparts service.

    partIds

    a list of partIds in specific to retrieve endpoint info for.

    Definition Classes
    OctoClientLike
  34. val logger: Logger

    Simple named logger

    Simple named logger

    Attributes
    protected
    Definition Classes
    OctoClientLike
  35. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  38. implicit val octoPlayApp: Application

  39. def rescueAggregateResponse: AggregateResponse

    Defines the AggregateResponse rescue return value

    Defines the AggregateResponse rescue return value

    Attributes
    protected
    Definition Classes
    OctoClientOctoClientLike
  40. def rescueHttpPartConfigs: Seq[HttpPartConfig]

    Defines the SeqHttpPartConfig rescue return value

    Defines the SeqHttpPartConfig rescue return value

    Attributes
    protected
    Definition Classes
    OctoClientOctoClientLike
  41. def rescuer[A](defaultReturn: ⇒ A): PartialFunction[Throwable, A]

    PartialFunction for recovering from errors when hitting Octoparts

    PartialFunction for recovering from errors when hitting Octoparts

    Attributes
    protected
    Definition Classes
    OctoClientOctoClientLike
  42. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  43. def toString(): String

    Definition Classes
    AnyRef → Any
  44. def urlFor(opUrl: ApiUrl, pathSegments: String*): String

    Given an ApiUrl and path segments, returns the full URL for that operation, filling in path segments where appropriate

    Given an ApiUrl and path segments, returns the full URL for that operation, filling in path segments where appropriate

    Attributes
    protected[com.m3.octoparts.ws]
    Definition Classes
    OctoClientLike
  45. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  48. def wsHolderFor(url: String, timeout: FiniteDuration): WSRequestHolder

    Returns a play.api.libs.ws.WSRequestHolder for a given a URL string

    Returns a play.api.libs.ws.WSRequestHolder for a given a URL string

    Attributes
    protected
    Definition Classes
    OctoClientOctoClientLike
  49. def wsPost[A](url: String, timeout: FiniteDuration, body: A, headers: Seq[(String, String)] = Nil)(implicit wrt: Writeable[A], ct: ContentTypeOf[A]): Future[WSResponse]

    Asynchronously sends a POST request to Octoparts.

    Asynchronously sends a POST request to Octoparts.

    You may wish to (abstract) override this if you want to do custom error-handling on the WS request level.

    url

    URL to post to

    timeout

    Timeout value for the request

    headers

    headers to send along with the request

    Attributes
    protected
    Definition Classes
    OctoClientLike

Inherited from OctoClientLike

Inherited from AnyRef

Inherited from Any

Ungrouped