Package org.restheart.mongodb.hal
Class HALRepresentation
- java.lang.Object
-
- org.restheart.mongodb.hal.HALRepresentation
-
- All Implemented Interfaces:
ConfigurablePlugin,ExchangeTypeResolver<MongoRequest,MongoResponse>,Interceptor<MongoRequest,MongoResponse>,MongoInterceptor,Plugin
public class HALRepresentation extends Object implements MongoInterceptor
Transform the response content to HAL or SHAL format when required (e.g. when the request has the query parameter ?rep=HAL)- Author:
- Andrea Di Cesare
-
-
Constructor Summary
Constructors Constructor Description HALRepresentation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidhandle(MongoRequest request, MongoResponse response)booleanresolve(MongoRequest request, MongoResponse response)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.restheart.plugins.ExchangeTypeResolver
requestType, responseType
-
-
-
-
Method Detail
-
handle
public void handle(MongoRequest request, MongoResponse response) throws Exception
- Specified by:
handlein interfaceInterceptor<MongoRequest,MongoResponse>- Throws:
Exception
-
resolve
public boolean resolve(MongoRequest request, MongoResponse response)
- Specified by:
resolvein interfaceInterceptor<MongoRequest,MongoResponse>
-
-