concrete.annotate.AnnotateWithContextService module

class concrete.annotate.AnnotateWithContextService.Client(iprot, oprot=None)

Bases: concrete.services.Service.Client, concrete.annotate.AnnotateWithContextService.Iface


A service that provides an alternative to Annotate,
with the ability to pass along an additional Context
parameter that conveys additional information about the
Communication.


annotate(original, context)

Takes a Communication and a Context as input
and returns a new one as output.

It is up to the implementing service to verify that
the input communication is valid, as well as interpret
the Context in an appropriate manner.

Can throw a ConcreteThriftException upon error
(invalid input, analytic exception, etc.).

Parameters:
- original
- context


recv_annotate()
send_annotate(original, context)
class concrete.annotate.AnnotateWithContextService.Iface

Bases: concrete.services.Service.Iface


A service that provides an alternative to Annotate,
with the ability to pass along an additional Context
parameter that conveys additional information about the
Communication.


annotate(original, context)

Takes a Communication and a Context as input
and returns a new one as output.

It is up to the implementing service to verify that
the input communication is valid, as well as interpret
the Context in an appropriate manner.

Can throw a ConcreteThriftException upon error
(invalid input, analytic exception, etc.).

Parameters:
- original
- context


class concrete.annotate.AnnotateWithContextService.Processor(handler)

Bases: concrete.services.Service.Processor, concrete.annotate.AnnotateWithContextService.Iface, thrift.Thrift.TProcessor

on_message_begin(func)
process(iprot, oprot)
process_annotate(seqid, iprot, oprot)
class concrete.annotate.AnnotateWithContextService.annotate_args(original=None, context=None)

Bases: object


Attributes:
- original
- context


read(iprot)
validate()
write(oprot)
class concrete.annotate.AnnotateWithContextService.annotate_result(success=None, ex=None)

Bases: object


Attributes:
- success
- ex


read(iprot)
validate()
write(oprot)