|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avalon.framework.logger.AbstractLogEnabled org.apache.cocoon.reading.AbstractReader org.apache.cocoon.reading.ServiceableReader org.apache.cocoon.portal.reading.ProxyReader
public class ProxyReader
This reader is used to retrieve non XML content from external applications routet via the portal site. Requests from external resources are marked with a proxy prefix and have coplet id and portal name attached as request parameters. The portal name and coplet id are used to look up necessary connection data for the external request (like session id, cookies, document base, etc.) from the application coplet instance data.
Field Summary | |
---|---|
protected CopletInstanceData |
copletInstanceData
The coplet instance data |
protected String |
prefix
The prefix |
protected Request |
request
The origninal HTTP request |
protected Response |
response
The HTTP response |
Fields inherited from class org.apache.cocoon.reading.ServiceableReader |
---|
manager |
Fields inherited from class org.apache.cocoon.reading.AbstractReader |
---|
objectModel, out, parameters, resolver, source |
Fields inherited from interface org.apache.cocoon.reading.Reader |
---|
ROLE |
Constructor Summary | |
---|---|
ProxyReader()
|
Method Summary | |
---|---|
protected HttpURLConnection |
connect(Request request,
String uri)
Establish the HttpURLConnection to the given uri. |
void |
generate()
Send the request to the external WebServer |
void |
recycle()
Recycle the component |
protected void |
sendData(InputStream in)
Copy the data to the original response stream |
void |
setup(SourceResolver resolver,
Map objectModel,
String src,
Parameters par)
Set the SourceResolver the object model Map ,
the source and sitemap Parameters used to process the request. |
Methods inherited from class org.apache.cocoon.reading.ServiceableReader |
---|
service |
Methods inherited from class org.apache.cocoon.reading.AbstractReader |
---|
getLastModified, getMimeType, setOutputStream, shouldSetContentLength |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
---|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected CopletInstanceData copletInstanceData
protected Response response
protected Request request
protected String prefix
Constructor Detail |
---|
public ProxyReader()
Method Detail |
---|
public void setup(SourceResolver resolver, Map objectModel, String src, Parameters par) throws ProcessingException, SAXException, IOException
AbstractReader
SourceResolver
the object model Map
,
the source and sitemap Parameters
used to process the request.
setup
in interface SitemapModelComponent
setup
in class AbstractReader
ProcessingException
SAXException
IOException
SitemapModelComponent.setup(SourceResolver, Map, String, Parameters)
public void recycle()
AbstractReader
recycle
in interface Recyclable
recycle
in class AbstractReader
Recyclable.recycle()
public void generate() throws IOException
IOException
- on any exception that occuresReader.generate()
protected void sendData(InputStream in) throws IOException
in
- the response from external request to read from
IOException
- on any exceptionprotected HttpURLConnection connect(Request request, String uri) throws IOException
request
- the original requesturi
- the remote uri
IOException
- on any exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |