public interface ODataContext
Modifier and Type | Interface and Description |
---|---|
static interface |
ODataContext.RuntimeMeasurement
Runtime measurements.
|
Modifier and Type | Field and Description |
---|---|
static String |
HTTP_SERVLET_REQUEST_OBJECT |
Modifier and Type | Method and Description |
---|---|
List<Locale> |
getAcceptableLanguages()
Gets a list of languages that are acceptable for the response.
|
ODataContext |
getBatchParentContext()
If a request execution is part of batch processing then this method returns the context of the
outer batch request.
|
String |
getHttpMethod()
Gets the HTTP method of the request.
|
Object |
getParameter(String name)
Gets a named parameter value.
|
PathInfo |
getPathInfo()
Gets information about the request path.
|
String |
getRequestHeader(String name)
Returns the first found header value of the HTTP request.
|
Map<String,List<String>> |
getRequestHeaders()
Returns all header values of the HTTP request but never null.
|
List<ODataContext.RuntimeMeasurement> |
getRuntimeMeasurements()
Gets the list of all runtime measurements.
|
ODataService |
getService()
Gets the OData service.
|
ODataServiceFactory |
getServiceFactory() |
boolean |
isInBatchMode() |
boolean |
isInDebugMode()
Gets information about enabled debug mode.
|
void |
removeParameter(String name)
Removes parameter.
|
void |
setDebugMode(boolean debugMode)
Enables debug mode.
|
void |
setParameter(String name,
Object value)
Sets a parameter.
|
int |
startRuntimeMeasurement(String className,
String methodName)
Starts runtime measurement.
|
void |
stopRuntimeMeasurement(int handle)
Stops runtime measurement.
|
static final String HTTP_SERVLET_REQUEST_OBJECT
ODataService getService() throws ODataException
ODataException
ODataServiceFactory getServiceFactory()
PathInfo getPathInfo() throws ODataException
ODataException
ODataContext getBatchParentContext()
boolean isInBatchMode()
int startRuntimeMeasurement(String className, String methodName)
className
- class name where the runtime measurement startsmethodName
- method name where the runtime measurement startsvoid stopRuntimeMeasurement(int handle)
handle
- of runtime measurement to be stoppedList<ODataContext.RuntimeMeasurement> getRuntimeMeasurements()
ODataContext.RuntimeMeasurement
String getHttpMethod()
String
void setParameter(String name, Object value)
name
- of parameter (name is used as key, existing values are overwritten)value
- of parameter as objectvoid removeParameter(String name)
name
- of parameter to be removedObject getParameter(String name)
name
- of parameterObject
for the given nameString getRequestHeader(String name)
name
- name of the first found request header element (e.g. "Content-Type")Map<String,List<String>> getRequestHeaders()
boolean isInDebugMode()
void setDebugMode(boolean debugMode)
debugMode
- as booleanList<Locale> getAcceptableLanguages()
Copyright © 2013-2017 The Apache Software Foundation. All Rights Reserved.