Class ServiceContext
java.lang.Object
org.deltava.jdbc.ConnectionContext
org.deltava.commands.HTTPContext
org.deltava.service.ServiceContext
- All Implemented Interfaces:
SecurityContext
- Direct Known Subclasses:
SNSContext
An invocation/security context object for Web Services.
- Since:
- 1.0
- Version:
- 8.3
- Author:
- Luke
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.deltava.jdbc.ConnectionContext
ConnectionContext.ConnectionPoolException
-
Field Summary
Fields inherited from class org.deltava.commands.HTTPContext
_req, _rsp, ADDRINFO_ATTR_NAME, CAPTCHA_ATTR_NAME, HTTPCTXT_ATTR_NAME, RTLIMIT_ATTR_NAME, SU_ATTR_NAME, USER_ATTR_NAME, USERAGENT_ATTR_NAME
-
Constructor Summary
ConstructorsConstructorDescriptionIntiailizes the Web Service context. -
Method Summary
Modifier and TypeMethodDescriptionvoid
commit()
Writes the output buffer to the HTTP servlet response, setting the Content-length header.getBody()
Retrieves the POST body.void
Prints a string to the output buffer.void
Prints a string and a trailing newline to the output buffer.void
setContentType
(String contentType) Helper method to set the content type.void
setContentType
(String contentType, String encoding) Helper method to set the content type and output encoding.Methods inherited from class org.deltava.commands.HTTPContext
addCookie, getCmdParameter, getCookie, getFile, getParameter, getParameters, getParameters, getRequest, getResponse, getRoles, getSession, getUser, isAuthenticated, isSuperUser, isUserInRole, passedCAPTCHA, setAttribute, setExpiry, setHeader, setHeader, setUser
Methods inherited from class org.deltava.jdbc.ConnectionContext
commitTX, getConnection, getDB, hasConnection, release, rollbackTX, setDB, startTX
-
Constructor Details
-
ServiceContext
Intiailizes the Web Service context.- Parameters:
req
- the HTTP servlet requestrsp
- the HTTP servlet response- See Also:
-
-
Method Details
-
getBody
-
print
Prints a string to the output buffer.- Parameters:
data
- the string to print- See Also:
-
println
Prints a string and a trailing newline to the output buffer.- Parameters:
data
- the string to print- See Also:
-
commit
Writes the output buffer to the HTTP servlet response, setting the Content-length header.- Throws:
IOException
- if an I/O error occurs- See Also:
-
setContentType
-
setContentType
Helper method to set the content type.- Parameters:
contentType
- the content type
-