Module aeonics.http
Package aeonics.http

Class Endpoint.Websocket.Type

    • Constructor Detail

      • Type

        public Type()
    • Method Detail

      • process

        public Data process​(Message request)
                     throws java.lang.Exception
        Description copied from class: Endpoint.Type
        Processes the request and generates a response.

        The generated response can be any of the following:

        • null: a 204 response is sent
        • an exception: it is the same as if you throw it
        • a scalar data type: it is sent as-is with an 'application/octet-stream' mime type and a code 200
        • a list or map data type: it is converted to its JSON representation and sent with an 'application/json' mime type and a code 200
        • a special response data map containing:
          • isHttpResponse [required]: true [required]
          • code: the http status code to send. Default 200.
          • status: the http status text. If not specified, it will be derived from the response code.
          • mime: the mime type to send. Default 'application/octet-stream'.
          • body: the content to send (if a data map or list, then its JSON representation is used). Default to "".
          • headers: any http response headers to send as a data map.
        Specified by:
        process in class Endpoint.Type
        Parameters:
        request - the original message data
        Returns:
        the generated response
        Throws:
        java.lang.Exception - if anything happens, the exception will be wrapped in an HttpException