public class FacadeCommandContext extends Object implements NutsHttpServletFacadeContext
| Constructor and Description |
|---|
FacadeCommandContext(NutsHttpServletFacadeContext base,
String serverId,
String command,
String path,
net.thevpc.nuts.NutsSession session) |
| Modifier and Type | Method and Description |
|---|---|
void |
addResponseHeader(String name,
String value) |
String |
getCommand() |
Map<String,List<String>> |
getParameters() |
String |
getPath() |
InputStream |
getRequestBody() |
List<String> |
getRequestHeaderAllValues(String header) |
String |
getRequestHeaderFirstValue(String header) |
Set<String> |
getRequestHeaderKeys(String header) |
String |
getRequestMethod() |
URI |
getRequestURI() |
OutputStream |
getResponseBody() |
String |
getServerId() |
net.thevpc.nuts.NutsSession |
getSession() |
net.thevpc.nuts.NutsWorkspace |
getWorkspace() |
boolean |
isGetMethod() |
boolean |
isHeadMethod() |
boolean |
isPostMethod() |
void |
sendError(int code,
String msg) |
void |
sendResponseBytes(int code,
byte[] bytes) |
void |
sendResponseFile(int code,
File file) |
void |
sendResponseFile(int code,
Path file) |
void |
sendResponseHeaders(int code,
long length) |
void |
sendResponseText(int code,
String text) |
public FacadeCommandContext(NutsHttpServletFacadeContext base, String serverId, String command, String path, net.thevpc.nuts.NutsSession session)
public net.thevpc.nuts.NutsSession getSession()
public String getPath()
public String getCommand()
public net.thevpc.nuts.NutsWorkspace getWorkspace()
public String getServerId()
public URI getRequestURI() throws IOException
getRequestURI in interface NutsHttpServletFacadeContextIOExceptionpublic OutputStream getResponseBody() throws IOException
getResponseBody in interface NutsHttpServletFacadeContextIOExceptionpublic void sendResponseHeaders(int code,
long length)
throws IOException
sendResponseHeaders in interface NutsHttpServletFacadeContextIOExceptionpublic void sendError(int code,
String msg)
throws IOException
sendError in interface NutsHttpServletFacadeContextIOExceptionpublic void sendResponseText(int code,
String text)
throws IOException
sendResponseText in interface NutsHttpServletFacadeContextIOExceptionpublic void sendResponseFile(int code,
File file)
throws IOException
sendResponseFile in interface NutsHttpServletFacadeContextIOExceptionpublic void sendResponseBytes(int code,
byte[] bytes)
throws IOException
sendResponseBytes in interface NutsHttpServletFacadeContextIOExceptionpublic void sendResponseFile(int code,
Path file)
throws IOException
sendResponseFile in interface NutsHttpServletFacadeContextIOExceptionpublic Set<String> getRequestHeaderKeys(String header) throws IOException
getRequestHeaderKeys in interface NutsHttpServletFacadeContextIOExceptionpublic String getRequestHeaderFirstValue(String header) throws IOException
getRequestHeaderFirstValue in interface NutsHttpServletFacadeContextIOExceptionpublic List<String> getRequestHeaderAllValues(String header) throws IOException
getRequestHeaderAllValues in interface NutsHttpServletFacadeContextIOExceptionpublic InputStream getRequestBody() throws IOException
getRequestBody in interface NutsHttpServletFacadeContextIOExceptionpublic Map<String,List<String>> getParameters() throws IOException
getParameters in interface NutsHttpServletFacadeContextIOExceptionpublic void addResponseHeader(String name, String value) throws IOException
addResponseHeader in interface NutsHttpServletFacadeContextIOExceptionpublic String getRequestMethod() throws IOException
getRequestMethod in interface NutsHttpServletFacadeContextIOExceptionpublic boolean isGetMethod()
throws IOException
isGetMethod in interface NutsHttpServletFacadeContextIOExceptionpublic boolean isPostMethod()
throws IOException
isPostMethod in interface NutsHttpServletFacadeContextIOExceptionpublic boolean isHeadMethod()
throws IOException
isHeadMethod in interface NutsHttpServletFacadeContextIOExceptionCopyright © 2022 vpc open source initiative. All rights reserved.