org.mashupbots.socko

rest

package rest

Visibility
  1. Public
  2. All

Type Members

  1. trait AllowableValues extends AnyRef

    Identifies a org.mashupbots.socko.rest.RestRequest parameter validation

  2. case class AllowableValuesList[T](values: List[T], valueType: String = "LIST") extends AllowableValues with Product with Serializable

  3. case class AllowableValuesRange[T](min: T, max: T, valueType: String = "RANGE") extends AllowableValues with Product with Serializable

  4. case class BodyBinding(config: RestConfig, registration: BodyParam, tpeCategory: RequestBodyDataType.Value, tpe: scala.reflect.api.JavaUniverse.Type, objectClass: Option[Class[_]], required: Boolean) extends RequestParamBinding with Product with Serializable

    Binds a value in the request class to a value in the request body

  5. case class BodyParam(name: String, description: String = "") extends RequestParam with Product with Serializable

    Parameter that binds to a value in the header

  6. case class ByteArrayDataSerializer(responseDataTerm: scala.reflect.api.JavaUniverse.TermSymbol, rm: scala.reflect.api.JavaUniverse.Mirror) extends NonVoidDataSerializer with Product with Serializable

    Serialize a byte array (hint: this does not do much!)

  7. case class ByteSeqDataSerializer(responseDataTerm: scala.reflect.api.JavaUniverse.TermSymbol, rm: scala.reflect.api.JavaUniverse.Mirror) extends NonVoidDataSerializer with Product with Serializable

    Serialize a byte sequence (hint: this does not do much!)

  8. abstract class DataSerializer extends AnyRef

    Serializes data into a byte array

  9. case class Error(code: Int, reason: String) extends Product with Serializable

    Details a HTTP error

  10. case class HeaderBinding(config: RestConfig, registration: HeaderParam, tpe: scala.reflect.api.JavaUniverse.Type, required: Boolean) extends PrimitiveParamBinding with Product with Serializable

    Binds a value in the request class to a value in the request header

  11. case class HeaderParam(name: String, description: String = "", headerName: String = "", allowMultiple: Boolean = false, allowableValues: Option[AllowableValues] = scala.None) extends RequestParam with Product with Serializable

    Parameter that binds to a value in the header

  12. case class NoSerializationRestResponse(context: RestResponseContext) extends RestResponse with Product with Serializable

    Class to denote that no serialization is required because it will be custom handled by the REST processing actor

  13. abstract class NonVoidDataSerializer extends DataSerializer

    Encapsulates common aspects of non void serializers

  14. case class ObjectDataSerializer(tpe: scala.reflect.api.JavaUniverse.Type, responseDataTerm: scala.reflect.api.JavaUniverse.TermSymbol, rm: scala.reflect.api.JavaUniverse.Mirror) extends NonVoidDataSerializer with Product with Serializable

    Serialize an object into a UTF-8 JSON byte array

  15. case class PathBinding(config: RestConfig, registration: PathParam, tpe: scala.reflect.api.JavaUniverse.Type, pathIndex: Int) extends PrimitiveParamBinding with Product with Serializable

    Binds a value in the request class to a value in the request uri path

  16. case class PathParam(name: String, description: String = "", allowableValues: Option[AllowableValues] = scala.None) extends RequestParam with Product with Serializable

    Parameter that binds to a value in the path

  17. case class PathSegment(name: String, isVariable: Boolean) extends Product with Serializable

    Encapsulates a path segment

  18. case class PrimitiveDataSerializer(tpe: scala.reflect.api.JavaUniverse.Type, responseDataTerm: scala.reflect.api.JavaUniverse.TermSymbol, rm: scala.reflect.api.JavaUniverse.Mirror) extends NonVoidDataSerializer with Product with Serializable

    Serialize a primitive into a UTF-8 JSON byte array

  19. trait PrimitiveParamBinding extends RequestParamBinding

    Path, QueryString and Header params must bind to a primitive.

  20. case class QueryParam(name: String, description: String = "", queryName: String = "", allowMultiple: Boolean = false, allowableValues: Option[AllowableValues] = scala.None) extends RequestParam with Product with Serializable

    Parameter that binds to a value in the query string

  21. case class QueryStringBinding(config: RestConfig, registration: QueryParam, tpe: scala.reflect.api.JavaUniverse.Type, required: Boolean) extends PrimitiveParamBinding with Product with Serializable

    Binds a value in the request class to a value in the request query string

  22. trait RequestParam extends AnyRef

    Identifies a org.mashupbots.socko.rest.RestRequest parameter binding

  23. trait RequestParamBinding extends AnyRef

    Binding of a request value

  24. case class RestBindingException(msg: String) extends Exception with Product with Serializable

    Exception raised during the process of deserializing and dispatching a request

  25. case class RestConfig(apiVersion: String, rootApiUrl: String, swaggerVersion: String = "1.1", swaggerApiGroupingPathSegment: Int = 1, requestTimeoutSeconds: Int = 60, sockoEventCacheTimeoutSeconds: Int = 5, maxWorkerCount: Int = 100, maxWorkerRescheduleMilliSeconds: Int = 500, reportRuntimeException: ReportRuntimeException.Value = ReportRuntimeException.Never) extends Extension with Product with Serializable

    Configuration for REST handler

  26. case class RestDefintionException(msg: String) extends Exception with Product with Serializable

    Error with your REST definition

  27. case class RestEndPoint(method: String, rootPath: String, relativePath: String) extends Product with Serializable

    The HTTP method and path to a REST operation

  28. class RestHandler extends Actor with FSM[RestHandlerState, RestHandlerData] with ActorLogging

    The initial processing point for incoming requests.

  29. trait RestHandlerData extends AnyRef

    FSM data for org.mashupbots.socko.rest.RestHandler

  30. sealed trait RestHandlerState extends AnyRef

    FSM states for org.mashupbots.socko.rest.RestHandler

  31. case class RestHandlerWorkerCountRequest() extends Product with Serializable

    Message that can be sent to a RestHandler to retrieve the current number of workers

  32. class RestHttpWorker extends Actor with FSM[RestHttpWorkerState, RestHttpWorkerData] with ActorLogging

    Processes a HTTP REST request.

  33. trait RestHttpWorkerData extends AnyRef

    FSM data for org.mashupbots.socko.rest.RestHttpWorker

  34. sealed trait RestHttpWorkerState extends AnyRef

    FSM states for org.mashupbots.socko.rest.RestHttpWorker

  35. trait RestModelMetaData extends AnyRef

    Meta data to describe REST model classes.

  36. case class RestNotFoundException(msg: String) extends Exception with Product with Serializable

    Exception raised during if a matching operation cannot be found

  37. case class RestOperation(registration: RestRegistration, endPoint: RestEndPoint, deserializer: RestRequestDeserializer, serializer: RestResponseSerializer) extends Product with Serializable

    A REST operation processes data in the following manner:

  38. case class RestProcessingException(msg: String) extends Exception with Product with Serializable

    Exception raised during the process of a request

  39. case class RestPropertyMetaData(name: String, description: String, allowableValues: Option[AllowableValues] = scala.None) extends Product with Serializable

    Describes a property in this model class

  40. abstract class RestRegistration extends AnyRef

    Binds a org.mashupbots.socko.rest.RestRequest, org.mashupbots.socko.rest.RestResponse and a processor actor to an end point.

  41. case class RestRegistry(operations: Seq[RestOperation], swaggerApiDocs: SwaggerApiDocs, config: RestConfig) extends Product with Serializable

    Collection org.mashupbots.socko.rest.RestOperations that will be used to process incoming requests.

  42. trait RestRequest extends AnyRef

    A request to be processed by a REST processing actor

  43. case class RestRequestContext(id: UUID, endPoint: EndPoint, headers: ImmutableHttpHeaders, eventType: SockoEventType.Value, timeoutSeconds: Int) extends Product with Serializable

    Provides context to a REST request.

  44. case class RestRequestDeserializer(config: RestConfig, requestClass: scala.reflect.api.JavaUniverse.ClassSymbol, requestConstructorMirror: scala.reflect.api.JavaUniverse.MethodMirror, requestParamBindings: List[RequestParamBinding]) extends Product with Serializable

    Deserializes incoming request data into a org.mashupbots.socko.rest.RestRequest

  45. trait RestResponse extends AnyRef

    The result of processing a org.mashupbots.socko.rest.RestRequest

  46. case class RestResponseContext(requestContext: RestRequestContext, status: HttpResponseStatus, headers: Map[String, String]) extends Product with Serializable

    Context of the REST response.

  47. case class RestResponseSerializer(config: RestConfig, responseClass: scala.reflect.api.JavaUniverse.ClassSymbol, dataSerializer: DataSerializer) extends Logger with Product with Serializable

    Serialized outgoing data from a org.mashupbots.socko.rest.RestResponse

  48. case class SwaggerApiDeclaration(apiVersion: String, swaggerVersion: String, basePath: String, resourcePath: String, apis: Seq[SwaggerApiPath], models: Map[String, SwaggerModel]) extends SwaggerDoc with Product with Serializable

    Swagger API declaration

  49. case class SwaggerApiDocs(lookup: Map[String, Array[Byte]]) extends Product with Serializable

    Generated Swagger API documentation

  50. case class SwaggerApiError(code: Int, reason: String) extends Product with Serializable

    API error refers to the HTTP response status code and its description

  51. case class SwaggerApiOperation(httpMethod: String, summary: Option[String], notes: Option[String], deprecated: Option[Boolean], responseClass: String, nickname: String, parameters: Option[Seq[SwaggerApiParameter]], errorResponses: Option[Seq[SwaggerApiError]]) extends Product with Serializable

    API operation refers to a specific HTTP operation that can be performed for a path

  52. case class SwaggerApiParameter(name: String, description: Option[String], paramType: String, dataType: String, required: Option[Boolean], allowableValues: Option[AllowableValues], allowMultiple: Option[Boolean]) extends Product with Serializable

    API parameter refers to a path, body, query string or header parameter in a org.mashupbots.socko.rest.SwaggerApiOperation

  53. case class SwaggerApiPath(path: String, operations: Seq[SwaggerApiOperation]) extends Product with Serializable

    API path refers to a specific path and all the operations for that path

  54. case class SwaggerContext(config: RestConfig, modelRegistry: SwaggerModelRegistry) extends Product with Serializable

  55. trait SwaggerDoc extends AnyRef

  56. case class SwaggerModel(id: String, description: Option[String], properties: Map[String, SwaggerModelProperty]) extends Product with Serializable

    A swagger model complex data type

  57. case class SwaggerModelProperty(type: String, description: Option[String], required: Option[Boolean], allowableValues: Option[AllowableValues], items: Option[Map[String, String]]) extends Product with Serializable

    A swagger model complex data type's properties

  58. case class SwaggerModelRegistry(rm: scala.reflect.api.JavaUniverse.Mirror) extends Product with Serializable

    Registry of swagger models.

  59. case class SwaggerResourceListing(apiVersion: String, swaggerVersion: String, basePath: String, apis: Seq[SwaggerResourceListingApi]) extends SwaggerDoc with Product with Serializable

    Swagger resource listing

  60. case class SwaggerResourceListingApi(path: String, description: String) extends Product with Serializable

    Describes a specific resource in the resource listing

  61. case class VoidDataSerializer() extends DataSerializer with Product with Serializable

    Serializes a void response.

Value Members

  1. object AllowableValues

    Companion object

  2. object Method extends Enumeration

    HTTP method supported by org.mashupbots.socko.rest.RestHandler

  3. object PathSegment extends Serializable

    Factory to parse a string into a path segment

  4. object PrimitiveDataSerializer extends Serializable

    Companion class

  5. object ReportRuntimeException extends Enumeration

    Indicates if we want to return a runtime exception message to the caller

  6. object RequestBodyDataType extends Enumeration

  7. object RequestParamBinding

    Companion object

  8. object RestBindingException extends Serializable

  9. object RestDefintionException extends Serializable

  10. object RestEndPoint extends Serializable

    Companion object

  11. object RestNotFoundException extends Serializable

  12. object RestProcessingException extends Serializable

  13. object RestRegistry extends Logger with Serializable

    Factory to instance a registry

  14. object RestRequestContext extends Serializable

    Companion object

  15. object RestRequestDeserializer extends Serializable

    Companion object

  16. object RestRequestEvents

    Cache of SockoEvents so REST processor actors can access it for custom request deseralization and custom response seralization.

  17. object RestResponseSerializer extends Serializable

    Companion object

  18. object SockoEventType extends Enumeration

    Denotes the type of org.mashupbots.socko.events.SockoEvent that triggered this REST request

  19. object SwaggerApiDeclaration extends Serializable

    Companion object

  20. object SwaggerApiDocs extends Logger with Serializable

    Companion object

  21. object SwaggerApiOperation extends Serializable

    Companion object

  22. object SwaggerApiParameter extends Serializable

    Companion object

  23. object SwaggerApiPath extends Serializable

    Companion object

  24. object SwaggerReflector

    Scala to Swagger conversion

  25. object SwaggerResourceListing extends Serializable

    Companion object

Ungrouped