public abstract class NWebCallContextAdapter extends Object implements NWebCallContext
| Constructor and Description |
|---|
NWebCallContextAdapter() |
protected abstract NWebCallContext base()
public URI getRequestURI()
getRequestURI in interface NWebCallContextpublic String getFirstPath()
getFirstPath in interface NWebCallContextpublic boolean isEmptyPath()
isEmptyPath in interface NWebCallContextpublic int getPathSize()
getPathSize in interface NWebCallContextpublic String[] getPathParts()
getPathParts in interface NWebCallContextpublic String getPathPart(int pos)
getPathPart in interface NWebCallContextpublic <T> T getRequestBodyAs(Class<T> cl)
getRequestBodyAs in interface NWebCallContextpublic String getRequestBodyAsString()
getRequestBodyAsString in interface NWebCallContextpublic String getPath()
getPath in interface NWebCallContextpublic OutputStream getResponseBody()
getResponseBody in interface NWebCallContextpublic NHttpMethod getMethod()
getMethod in interface NWebCallContextpublic NWebCallContext requireAuth()
requireAuth in interface NWebCallContextpublic NWebCallContext error(NMsg msg)
error in interface NWebCallContextpublic NWebCallContext trace(NHttpLogMsg msg)
trace in interface NWebCallContextpublic NWebCallContext info(NMsg msg)
info in interface NWebCallContextpublic NWebCallContext requireMethod(NHttpMethod... m)
requireMethod in interface NWebCallContextpublic NWebCallContext throwNoFound()
throwNoFound in interface NWebCallContextpublic NWebPrincipal getPrincipal()
getPrincipal in interface NWebCallContextpublic NOptional<NWebUser> getUser()
getUser in interface NWebCallContextpublic NWebCallContext setUser(NWebUser user)
setUser in interface NWebCallContextpublic NOptional<NWebToken> getToken()
getToken in interface NWebCallContextpublic NWebCallContext setToken(NWebToken token)
setToken in interface NWebCallContextpublic NWebCallContext runWithUnsafe(NUnsafeRunnable callable) throws Throwable
runWithUnsafe in interface NWebCallContextThrowablepublic Map<String,List<String>> getQueryParams()
getQueryParams in interface NWebCallContextpublic NOptional<String> getQueryParam(String queryParam)
getQueryParam in interface NWebCallContextpublic boolean containsQueryParam(String queryParam)
containsQueryParam in interface NWebCallContextpublic NOptional<String> getRequestHeader(String header)
getRequestHeader in interface NWebCallContextpublic Map<String,List<String>> getRequestHeaders()
getRequestHeaders in interface NWebCallContextpublic <T> T getRequestBodyAs(Class<T> cl, NContentType contentType)
getRequestBodyAs in interface NWebCallContextpublic List<String> getRequestHeaders(String header)
getRequestHeaders in interface NWebCallContextpublic Map<String,FormDataItem> getFormDataMap()
getFormDataMap in interface NWebCallContextpublic InputStream getRequestBody()
getRequestBody in interface NWebCallContextpublic NOptional<FormDataItem> getFormData(String name)
getFormData in interface NWebCallContextpublic boolean isMultipartRequest()
isMultipartRequest in interface NWebCallContextpublic NOptional<String> getMultipartRequestBoundary()
getMultipartRequestBoundary in interface NWebCallContextpublic NWebCallContext setResponseContentType(String contentType)
setResponseContentType in interface NWebCallContextpublic NWebCallContext setErrorCode(NMsgCode errorCode)
setErrorCode in interface NWebCallContextpublic NWebCallContext sendResponseHeaders()
sendResponseHeaders in interface NWebCallContextpublic NWebCallContext addResponseHeader(String name, String value)
addResponseHeader in interface NWebCallContextpublic NWebCallContext setResponseHeader(String name, String value)
setResponseHeader in interface NWebCallContextpublic NHttpCode getResponseCode()
getResponseCode in interface NWebCallContextpublic NWebCallContext setResponseCode(NHttpCode responseCode)
setResponseCode in interface NWebCallContextpublic NWebCallContext setTextResponse(String value)
setTextResponse in interface NWebCallContextpublic NWebCallContext setXmlResponse(String value)
setXmlResponse in interface NWebCallContextpublic NWebCallContext setJsonResponse(Object value)
setJsonResponse in interface NWebCallContextpublic NWebCallContext setBytesResponse(byte[] value)
setBytesResponse in interface NWebCallContextpublic NWebCallContext setFileResponse(NPath value)
setFileResponse in interface NWebCallContextpublic NWebCallContext setErrorResponse(NMsgCode errorCode)
setErrorResponse in interface NWebCallContextpublic NWebCallContext sendResponse()
sendResponse in interface NWebCallContextpublic NWebCallContext setErrorResponse(NWebHttpException ex)
setErrorResponse in interface NWebCallContextpublic NWebCallContext setErrorResponse(Throwable ex)
setErrorResponse in interface NWebCallContextpublic void close()
close in interface AutoCloseableclose in interface NWebCallContextpublic NWebHttpException wrapException(Throwable ex)
wrapException in interface NWebCallContextpublic boolean isResponseSent()
isResponseSent in interface NWebCallContextpublic void initializeConfig()
initializeConfig in interface NWebCallContextpublic NWebContext getWebContext()
getWebContext in interface NWebCallContextpublic NLoginResult authenticateWithCredentials(NAuthenticationRequest authenticationRequest)
authenticateWithCredentials in interface NWebCallContextpublic NLoginResult authenticateWithRefreshToken(String refreshToken)
authenticateWithRefreshToken in interface NWebCallContextpublic NWebUser authenticateWithAccessToken(String accessToken)
authenticateWithAccessToken in interface NWebCallContextpublic NOptional<String> getApiKeyRequestHeader()
getApiKeyRequestHeader in interface NWebCallContextpublic NOptional<String> getRealmRequestHeader()
getRealmRequestHeader in interface NWebCallContextCopyright © 2025 vpc open source initiative. All rights reserved.