Class RequestHandlerImpl
java.lang.Object
org.exoplatform.services.rest.impl.RequestHandlerImpl
- All Implemented Interfaces:
RequestHandler,org.picocontainer.Startable
public final class RequestHandlerImpl
extends Object
implements RequestHandler, org.picocontainer.Startable
- Version:
- $Id: $
- Author:
- Andrey Parfonov
-
Field Summary
Fields inherited from interface org.exoplatform.services.rest.RequestHandler
WS_RS_BUFFER_SIZE, WS_RS_BUFFER_SIZE_VALUE, WS_RS_TMP_DIR -
Constructor Summary
ConstructorsConstructorDescriptionRequestHandlerImpl(RequestDispatcher dispatcher, org.exoplatform.container.xml.InitParams params) Constructs new instance ofRequestHandler.RequestHandlerImpl(RequestDispatcher dispatcher, DependencySupplier dependencySupplier, org.exoplatform.container.xml.InitParams params) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPlugin(org.exoplatform.container.component.ComponentPlugin plugin) ProcessingComponentPluginfor injection external components.static final StringgetProperty(String name) voidhandleRequest(GenericContainerRequest request, GenericContainerResponse response) Handle the HTTP request by dispatching request to appropriate resource.voidinit()Startup initialization.static final voidsetProperty(String name, String value) voidstart()voidstop()
-
Constructor Details
-
RequestHandlerImpl
public RequestHandlerImpl(RequestDispatcher dispatcher, DependencySupplier dependencySupplier, org.exoplatform.container.xml.InitParams params) -
RequestHandlerImpl
public RequestHandlerImpl(RequestDispatcher dispatcher, org.exoplatform.container.xml.InitParams params) Constructs new instance ofRequestHandler.- Parameters:
dispatcher- SeeRequestDispatcherparams- init parameters
-
-
Method Details
-
getProperty
-
setProperty
-
handleRequest
public void handleRequest(GenericContainerRequest request, GenericContainerResponse response) throws Exception Handle the HTTP request by dispatching request to appropriate resource. If no one appropriate resource found then error response will be produced.- Specified by:
handleRequestin interfaceRequestHandler- Parameters:
request- HTTP requestresponse- HTTP response- Throws:
Exception- if any error occurs
-
start
public void start()- Specified by:
startin interfaceorg.picocontainer.Startable
-
stop
public void stop()- Specified by:
stopin interfaceorg.picocontainer.Startable
-
init
public void init()Startup initialization. -
addPlugin
public void addPlugin(org.exoplatform.container.component.ComponentPlugin plugin) ProcessingComponentPluginfor injection external components.- Parameters:
plugin- SeeComponentPlugin
-