com.sapportals.portal.prt.connection

Interface IPortalResponse


public interface IPortalResponse

A Portal Response is a connections abstraction of the portal response. The most basic part is the handling of the Writer that is to be used by the runtime to write a response to and the handling of the content type expected by the connection, as well as the content type provided by the runtime. Copyright (c) SAP Portals Europe GmbH 2001


Method Summary
 void addCookie(Cookie cookie)
          This method is called by the runtime to add a cookie to the response.
 void close()
          The close method is called when the runtime has done all response writing.
 void destroy()
          Destroy the response
 void flush()
          Flush the response
 String getContentType()
          Gets the current Content Type of this response.
 Cookie[] getCookies()
          Gets the cookies to this portal resposne
 long getSize()
          A call to getSize() is supposed to return the amount of outbound data in bytes counted by the response.
 Writer getWriter()
          Return the writer to write the response's content to
 boolean include(IPortalComponentRequest request, IResource resource)
          A connection provided implemenation of IPortalResponse can be capable of adding IResource implementations into the response.
 void setContentType(String type)
          Defines the content type (Mime Type) of this response's content, so that the connection may have its own interpretation.
 

Method Detail

getWriter

Writer getWriter()
Return the writer to write the response's content to


include

boolean include(IPortalComponentRequest request,
                IResource resource)
A connection provided implemenation of IPortalResponse can be capable of adding IResource implementations into the response. Resources abstract from various kinds of included content. An implementation that does not want to take care of this procedure should return false to indicate that any other kind of default implementation can take care of the resource to be added to the response

Parameters:
request - The current Portal Request
resource - A reference to an IResource implementation
Returns:
A boolean indicating wether the implementation was capable of handling the specified resource.

setContentType

void setContentType(String type)
Defines the content type (Mime Type) of this response's content, so that the connection may have its own interpretation.

Parameters:
type - A mime type specification of the content type provided to this response.

getContentType

String getContentType()
Gets the current Content Type of this response.

Returns:
The type of content expected when writing to this response.

flush

void flush()
Flush the response


destroy

void destroy()
Destroy the response


close

void close()
The close method is called when the runtime has done all response writing.


getSize

long getSize()
A call to getSize() is supposed to return the amount of outbound data in bytes counted by the response. This information might be used for monitoring. An implementation that does not wish to care about this information should return a negative value. In any case, a meaningful return value is not needed before a call to close() has occured.

Returns:
The number of bytes (to be) sent to the client or a negative value if not supported.

addCookie

void addCookie(Cookie cookie)
This method is called by the runtime to add a cookie to the response. It is up to the connection to decide what to do with it.

Parameters:
cookie - A cookie

getCookies

Cookie[] getCookies()
Gets the cookies to this portal resposne

Returns:
an array of cookies
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] EP-BASIS-API [sap.com] tc/epbc/prt/api api EP-PIN
[sap.com] EP-BASIS-API [sap.com] tc/epbc/prt/lib/api api EP-PIN
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM


Copyright 2015 SAP AG Complete Copyright Notice