Overview Package Class Tree Serialized Deprecated Index Help PREV class NEXT class SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD
org.apache.jetspeed.portlet.service
Interface ContentAccessService
- All Superinterfaces:
- PortletService
- public interface ContentAccessService
- extends PortletService
Service to access external and internal resources. This on-demand proxy allows the creation of a URL or Stream which can then be passed to other classes without knowing about the proxy support to enable seemless adaption to proxied environments. The proxying will be provided to the URL object by means of a StreamHandler.
- Since:
- 4.1
Method Summary java.io.InputStream getInputStream(java.lang.String urlString, PortletRequest req, PortletResponse resp)
Returns an input stream that reads from the passed url.java.lang.String getMarkup(java.lang.String urlString, PortletRequest req, PortletResponse resp)
Returns the markup of the input stream read from the passed url.java.net.URL getURL(java.lang.String urlString, PortletRequest request, PortletResponse response)
Returns an URL object after following redirects using a proxy if necessaryvoid include(java.lang.String urlString, PortletRequest request, PortletResponse response)
Writes the content of the given url to the output stream of the portlet following redirects and using a proxy if necessary trying to use the RequestDispatcher to include local servlets or JSPs
Method Detail getURL
public java.net.URL getURL(java.lang.String urlString, PortletRequest request, PortletResponse response) throws PortletServiceException, java.net.MalformedURLException
- Returns an URL object after following redirects using a proxy if necessary
- Parameters:
- urlString - a string representing the start url
- request - the portlet request
- response - the portlet response
- Returns:
- URL object based on the given url string and the proxy configuration
- Throws:
- PortletServiceException - if the needed credential could not be retrieved or the expected URL could not been created.
- java.net.MalformedURLException - if the given urlString is a malformed URL.
getInputStream
public java.io.InputStream getInputStream(java.lang.String urlString, PortletRequest req, PortletResponse resp) throws PortletServiceException, java.net.MalformedURLException
- Returns an input stream that reads from the passed url.
- Parameters:
- urlString - a string representing the start url
- req -
- resp -
- Returns:
- InputStream from the proxied connection
- Throws:
- PortletServiceException - thrown if the portlet service fails
- java.net.MalformedURLException - thrown if the URL is invalid
getMarkup
public java.lang.String getMarkup(java.lang.String urlString, PortletRequest req, PortletResponse resp) throws PortletServiceException, java.net.MalformedURLException
- Returns the markup of the input stream read from the passed url.
- Parameters:
- urlString - a string representing the start url
- req -
- resp -
- Returns:
- String representing the markup of the proxied connection
- Throws:
- PortletServiceException - thrown if the portlet service fails.
- java.net.MalformedURLException - thrown if the URL is invalid.
include
public void include(java.lang.String urlString, PortletRequest request, PortletResponse response) throws PortletServiceException, java.net.MalformedURLException
- Writes the content of the given url to the output stream of the portlet following redirects and using a proxy if necessary trying to use the RequestDispatcher to include local servlets or JSPs
- Parameters:
- urlString - a string representing the start url
- request - the portlet request
- response - the portlet response
- Throws:
- PortletServiceException - thrown if the portlet service fails.
- java.net.MalformedURLException - thrown if the URL is invalid.
Overview Package Class Tree Serialized Deprecated Index Help PREV class NEXT class SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD
WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.
IBM is a trademark of the IBM Corporation in the United States, other countries, or both.