|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ServletConnection
Contract to connect to a servlet service. The implementing classes differ from how they look up the servlet service.
This class was designed similar to URLConnection
.
Method Summary | |
---|---|
void |
connect()
Connect to the servlet service. |
String |
getContentType()
Get the mime-type of the servlet-service. |
String |
getHeaderField(String name)
Get a response header with the given name. |
Map<String,String> |
getHeaders()
Get all response header fields. |
InputStream |
getInputStream()
Read the input stream from the servlet service response. |
long |
getLastModified()
Get the last modification date of the servlet service. |
OutputStream |
getOutputStream()
Get an output stream that writes as POST to this connection. |
int |
getResponseCode()
|
URI |
getURI()
Get a URI representing this servlet connection. |
void |
setIfModifiedSince(long ifmodifiedsince)
Set the last modification date if you want to make use of caching. |
Method Detail |
---|
void setIfModifiedSince(long ifmodifiedsince)
ifmodifiedsince
- The timestamp of the last known resource.OutputStream getOutputStream()
void connect() throws IOException, javax.servlet.ServletException
IOException
- The connection to the servlet service can't be established.
javax.servlet.ServletException
- Any other problem when connecting to a servlet service.InputStream getInputStream() throws IOException, javax.servlet.ServletException
IOException
- The connection to the servlet service can't be established.
javax.servlet.ServletException
- Any other problem when connecting to a servlet service.int getResponseCode() throws IOException
IOException
long getLastModified()
String getContentType()
URI getURI()
String getHeaderField(String name)
name
- The name of the header parameter
Map<String,String> getHeaders()
Map
that contains all response headers.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |