- java.lang.Object
-
- aeonics.entity.Entity
-
- aeonics.http.Endpoint.Type
-
- aeonics.http.Endpoint.Websocket.Type
-
- All Implemented Interfaces:
Exportable
,Snapshotable
- Enclosing class:
- Endpoint.Websocket
public static class Endpoint.Websocket.Type extends Endpoint.Type
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface aeonics.util.Snapshotable
Snapshotable.SnapshotMode
-
-
Constructor Summary
Constructors Constructor Description Type()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Data
process(Message request)
Processes the request and generates a response.-
Methods inherited from class aeonics.http.Endpoint.Type
category, export, matches, method, method, name, name, url, url
-
Methods inherited from class aeonics.entity.Entity
addRelation, addRelation, addRelation, cast, clearRelation, config, context, countRelations, countRelations, defineRelation, equals, firstRelation, hashCode, hasRelation, id, internal, internal, onCreate, onRemove, onUpdate, parameter, relations, relationships, removeRelation, snapshot, snapshotMode, template, type, valueOf, valueOf
-
-
-
-
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 classEndpoint.Type
- Parameters:
request
- the original message data- Returns:
- the generated response
- Throws:
java.lang.Exception
- if anything happens, the exception will be wrapped in anHttpException
-
-