Class

com.snowplowanalytics.snowplow.enrich.common.adapters.registry

RemoteAdapter

Related Doc: package registry

Permalink

class RemoteAdapter extends Adapter

An adapter for an enrichment that is handled by a remote webservice.

Linear Supertypes
Adapter, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RemoteAdapter
  2. Adapter
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new RemoteAdapter(remoteUrl: String, connectionTimeout: Option[Long], readTimeout: Option[Long])

    Permalink

    create a new client to talk to the given remote webservice.

    create a new client to talk to the given remote webservice.

    remoteUrl

    the url of the remote webservice, e.g. http://localhost/myEnrichment

    connectionTimeout

    max duration of each connection attempt

    readTimeout

    max duration of read wait time

Type Members

  1. type FormatterFunc = (RawEventParameters) ⇒ JObject

    Permalink
    Definition Classes
    Adapter

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. val EventEncType: String

    Permalink
    Definition Classes
    Adapter
  5. val JsonSchemaDateTimeFormat: DateTimeFormatter

    Permalink
    Definition Classes
    Adapter
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. val bodyMissingErrorText: String

    Permalink
  8. def buildFormatter(bools: List[String] = Nil, ints: List[String] = Nil, dateTimes: DateTimeFields = None): FormatterFunc

    Permalink

    Convenience function to build a simple formatter of RawEventParameters.

    Convenience function to build a simple formatter of RawEventParameters.

    bools

    A List of keys whose values should be processed as boolean-like Strings

    ints

    A List of keys whose values should be processed as integer-like Strings

    returns

    a formatter function which converts RawEventParameters into a cleaned JObject

    Attributes
    protected[com.snowplowanalytics.snowplow.enrich.common.adapters.registry]
    Definition Classes
    Adapter
  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. val connectionTimeout: Option[Long]

    Permalink

    max duration of each connection attempt

  11. val emptyResponseErrorText: String

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

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. implicit val formats: DefaultFormats.type

    Permalink
    Definition Classes
    Adapter
  16. final def getClass(): Class[_]

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

    Permalink
    Definition Classes
    AnyRef → Any
  18. val incompatibleResponseErrorText: String

    Permalink
  19. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  20. def lookupSchema(eventOpt: Option[String], vendor: String, index: Int, eventSchemaMap: Map[String, String]): Validated[String]

    Permalink

    USAGE: Multiple event payloads

    USAGE: Multiple event payloads

    Gets the correct Schema URI for the event passed from the vendor payload

    eventOpt

    An Option[String] which will contain a String or None

    vendor

    The vendor we are doing a schema lookup for; i.e. MailChimp or PagerDuty

    index

    The index of the event we are trying to get a schema URI for

    eventSchemaMap

    A map of event types linked to their relevant schema URI's

    returns

    the schema for the event or a Failure-boxed String if we cannot recognize the event type

    Attributes
    protected[com.snowplowanalytics.snowplow.enrich.common.adapters.registry]
    Definition Classes
    Adapter
  21. def lookupSchema(eventOpt: Option[String], vendor: String, eventSchemaMap: Map[String, String]): Validated[String]

    Permalink

    USAGE: Single event payloads

    USAGE: Single event payloads

    Gets the correct Schema URI for the event passed from the vendor payload

    eventOpt

    An Option[String] which will contain a String or None

    vendor

    The vendor we are doing a schema lookup for; i.e. MailChimp or PagerDuty

    eventSchemaMap

    A map of event types linked to their relevant schema URI's

    returns

    the schema for the event or a Failure-boxed String if we cannot recognize the event type

    Attributes
    protected[com.snowplowanalytics.snowplow.enrich.common.adapters.registry]
    Definition Classes
    Adapter
  22. val missingEventsErrorText: String

    Permalink
  23. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  26. def processResponse(payload: CollectorPayload, response: Validation[Throwable, String]): ValidatedRawEvents

    Permalink
  27. def rawEventsListProcessor(rawEventsList: List[Validated[RawEvent]]): ValidatedRawEvents

    Permalink

    USAGE: Multiple event payloads

    USAGE: Multiple event payloads

    Processes a list of Validated RawEvents into a ValidatedRawEvents object. If there were any Failures in the list we will only return these.

    rawEventsList

    The list of RawEvents that needs to be processed

    returns

    the ValidatedRawEvents which will be comprised of either Successful RawEvents or Failures

    Attributes
    protected[com.snowplowanalytics.snowplow.enrich.common.adapters.registry]
    Definition Classes
    Adapter
  28. val readTimeout: Option[Long]

    Permalink

    max duration of read wait time

  29. val remoteUrl: String

    Permalink

    the url of the remote webservice, e.g.

    the url of the remote webservice, e.g. http://localhost/myEnrichment

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

    Permalink
    Definition Classes
    AnyRef
  31. def toContext(contextJson: JValue): JValue

    Permalink

    Creates a Snowplow custom contexts entity by nesting the provided JValue in a self-describing envelope for the custom contexts.

    Creates a Snowplow custom contexts entity by nesting the provided JValue in a self-describing envelope for the custom contexts.

    contextJson

    The context which will be nested into the custom contexts envelope

    returns

    the self-describing custom contexts

    Attributes
    protected[com.snowplowanalytics.snowplow.enrich.common.adapters.registry]
    Definition Classes
    Adapter
  32. def toContexts(contextJsons: List[JValue]): JValue

    Permalink

    Creates a Snowplow custom contexts entity by nesting the provided JValues in a self-describing envelope for the custom contexts.

    Creates a Snowplow custom contexts entity by nesting the provided JValues in a self-describing envelope for the custom contexts.

    contextJsons

    The contexts which will be nested into the custom contexts envelope

    returns

    the self-describing custom contexts

    Attributes
    protected[com.snowplowanalytics.snowplow.enrich.common.adapters.registry]
    Definition Classes
    Adapter
  33. def toMap(parameters: List[NameValuePair]): Map[String, String]

    Permalink

    Converts a NonEmptyList of name:value pairs into a Map.

    Converts a NonEmptyList of name:value pairs into a Map.

    parameters

    A NonEmptyList of name:value pairs

    returns

    the name:value pairs in Map form

    Attributes
    protected[com.snowplowanalytics.snowplow.enrich.common.adapters.registry]
    Definition Classes
    Adapter
  34. def toRawEvents(payload: CollectorPayload)(implicit resolver: Resolver): ValidatedRawEvents

    Permalink

    POST the given payload to the remote webservice, wait for it to respond with an Either[List[String], List[RawEvent] ], and return that as a ValidatedRawEvents

    POST the given payload to the remote webservice, wait for it to respond with an Either[List[String], List[RawEvent] ], and return that as a ValidatedRawEvents

    payload

    The CollectorPaylod containing one or more raw events as collected by a Snowplow collector

    resolver

    (implicit) The Iglu resolver used for schema lookup and validation

    returns

    a Validation boxing either a NEL of RawEvents on Success, or a NEL of Failure Strings

    Definition Classes
    RemoteAdapterAdapter
  35. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  36. def toUnstructEvent(eventJson: JValue): JValue

    Permalink

    Creates a Snowplow unstructured event by nesting the provided JValue in a self-describing envelope for the unstructured event.

    Creates a Snowplow unstructured event by nesting the provided JValue in a self-describing envelope for the unstructured event.

    eventJson

    The event which we will nest into the unstructured event

    returns

    the self-describing unstructured event

    Attributes
    protected[com.snowplowanalytics.snowplow.enrich.common.adapters.registry]
    Definition Classes
    Adapter
  37. def toUnstructEventParams(tracker: String, qsParams: RawEventParameters, schema: String, eventJson: JValue, platform: String): RawEventParameters

    Permalink

    Fabricates a Snowplow unstructured event from the supplied parameters.

    Fabricates a Snowplow unstructured event from the supplied parameters. Note that to be a valid Snowplow unstructured event, the event must contain e, p and tv parameters, so we make sure to set those.

    tracker

    The name and version of this tracker

    qsParams

    The query-string parameters we will nest into the unstructured event

    schema

    The schema key which defines this unstructured event as a String

    eventJson

    The event which we will nest into the unstructured event

    platform

    The default platform to assign the event to

    returns

    the raw-event parameters for a valid Snowplow unstructured event

    Attributes
    protected[com.snowplowanalytics.snowplow.enrich.common.adapters.registry]
    Definition Classes
    Adapter
  38. def toUnstructEventParams(tracker: String, parameters: RawEventParameters, schema: String, formatter: FormatterFunc, platform: String): RawEventParameters

    Permalink

    Fabricates a Snowplow unstructured event from the supplied parameters.

    Fabricates a Snowplow unstructured event from the supplied parameters. Note that to be a valid Snowplow unstructured event, the event must contain e, p and tv parameters, so we make sure to set those.

    tracker

    The name and version of this tracker

    parameters

    The raw-event parameters we will nest into the unstructured event

    schema

    The schema key which defines this unstructured event as a String

    formatter

    A function to take the raw event parameters and turn them into a correctly formatted JObject that should pass JSON Schema validation

    platform

    The default platform to assign the event to

    returns

    the raw-event parameters for a valid Snowplow unstructured event

    Attributes
    protected[com.snowplowanalytics.snowplow.enrich.common.adapters.registry]
    Definition Classes
    Adapter
  39. final def wait(): Unit

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

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

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

Inherited from Adapter

Inherited from AnyRef

Inherited from Any

Ungrouped