Interface HttpServerComponent
-
- All Known Subinterfaces:
ExceptionHandler,JsonLibrary,WorkerPool
- All Known Implementing Classes:
DefaultWorkerPool,Jackson2JsonLibrary,SimpleExceptionHandler,WrappedWorkerPool
public interface HttpServerComponentDefines an interface of HTTP server components.- Since:
- 1.3
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidclose()Closes thisHttpServerComponentand releases any system resources associated with it.java.lang.Class<? extends HttpServerComponent>componentType()Returns the type of the component.default voidonServerClosed()This method will be invoked by framework when theHttpServerwhich thisHttpServerComponentbelongs to is just be closed.
-
-
-
Method Detail
-
componentType
java.lang.Class<? extends HttpServerComponent> componentType()
Returns the type of the component.- Returns:
- the type of the component
-
onServerClosed
default void onServerClosed() throws java.lang.ExceptionThis method will be invoked by framework when theHttpServerwhich thisHttpServerComponentbelongs to is just be closed.This method is equivalent to
close().- Throws:
java.lang.Exception- if any error occurs
-
close
default void close() throws java.lang.ExceptionCloses thisHttpServerComponentand releases any system resources associated with it.Default do nothing.
- Throws:
java.lang.Exception- if any error occurs
-
-