|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.craftforge.essential.controller.Controller
public class Controller
| Method Summary | |
|---|---|
static Controller |
getInstance(String packagePath)
Controls instantiation process to ensure that only one controller per package path and default configuration is used. |
static Controller |
getInstance(String packagePath,
Configuration config)
Controls instantiation process to ensure that only one controller per package path and configuration (identified by name) is used. |
int |
perform(Request request,
Response response)
Performs a request on the controller, using the response to write back the serialized result. |
int |
perform(String httpMethod,
String urlInfoPart,
Map<String,String[]> requestHeaders,
Map<String,String[]> requestParameters,
InputStream inputStream,
OutputStream outputStream)
Performs a request on a controller using the HTTP method and info part to allocate the resource. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Controller getInstance(String packagePath,
Configuration config)
packagePath - The package pathconfig - The configuration
public static Controller getInstance(String packagePath)
packagePath - The package path
public int perform(String httpMethod,
String urlInfoPart,
Map<String,String[]> requestHeaders,
Map<String,String[]> requestParameters,
InputStream inputStream,
OutputStream outputStream)
throws ControllerException
httpMethod - The HTTP methodurlInfoPart - The URL info part (to identify the resource by this framework)requestHeaders - The request headers a map (keys = header names, values = header content)requestParameters - The request parametersinputStream - The input stream of the request bodyoutputStream - The output stream of the response body
ControllerException - Failed to perform the request
public int perform(Request request,
Response response)
throws ControllerException
request - The requestresponse - The response.
ControllerException - Failed to perform the request
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||