Package com.networknt.status
Interface StatusWrapper
-
public interface StatusWrapperInterface to allow custom Status and then inject the customized status into framework through SingletonFactoryImplement the interface and configure in service.yml - com.networknt.status.StatusWrapper - custom implementation class package
- Author:
- Jiachen Sun
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Statuswrap(Status status, Object exchange)Encapsulate the default status of the framework as a custom status.
-
-
-
Method Detail
-
wrap
Status wrap(Status status, Object exchange)
Encapsulate the default status of the framework as a custom status. If you want to add information from the HttpServerExchange, you can use the exchange parameter. However, it is passed as an Object, so you need to cast it to the actual type in your implementation class.- Parameters:
status- The status to be wrappedexchange- The source of custom info used to wrap status- Returns:
- the custom status
-
-