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.
| Modifier and Type | Method and Description |
|---|---|
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.
|
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
IOExceptionlong getLastModified()
String getContentType()
URI getURI()
String getHeaderField(String name)
name - The name of the header parameterCopyright © 1999-2012 The Apache Software Foundation. All Rights Reserved.