com.sapportals.portal.ivs.http

Interface IHTTPService

All Superinterfaces:
IHTTP, IService

public interface IHTTPService
extends IHTTP, IService

Title: Extension of the IHTTP interface.
Description: Contains information about ssl properties.
Copyright: Copyright (c) 2002
Company: SAP Ra'anana Israel.


Field Summary
static String KEY
           
static String NO_VALUE
           
static String USER_AGENT_IE_5
           
static String USER_AGENT_KEY
           
 
Method Summary
 void getPageInResponse(String url, IPortalComponentResponse response)
          Deprecated.  
 String getPageInString(String url)
          Deprecated.  
 String getSSLContentAsText(String url, String method, String[] reqPropertiesKeys, String[] reqPropertiesVals, boolean allowCookies, boolean allowRedirect, boolean usecaches, long ifModifiedSince, String basicAuthenticatedUserName, String basicAuthenticatedPassword, boolean ssl)
          Deprecated.  
 Properties getSSLProperties()
          Returns the SSL properties as configured and loaded by the portal service.
 
Methods inherited from interface com.sapportals.portal.ivs.http.IHTTP
getContentAsText, getContentAsText
 
Methods inherited from interface com.sapportals.portal.prt.service.IService
afterInit, configure, destroy, getContext, getKey, init, release
 

Field Detail

KEY

static final String KEY
See Also:
Constant Field Values

USER_AGENT_KEY

static final String USER_AGENT_KEY
See Also:
Constant Field Values

USER_AGENT_IE_5

static final String USER_AGENT_IE_5
See Also:
Constant Field Values

NO_VALUE

static final String NO_VALUE
See Also:
Constant Field Values
Method Detail

getSSLContentAsText

String getSSLContentAsText(String url,
                           String method,
                           String[] reqPropertiesKeys,
                           String[] reqPropertiesVals,
                           boolean allowCookies,
                           boolean allowRedirect,
                           boolean usecaches,
                           long ifModifiedSince,
                           String basicAuthenticatedUserName,
                           String basicAuthenticatedPassword,
                           boolean ssl)
Deprecated. 

Retrieves the contents of the given SSL URL or the status code in case of failure. All server's SSL configuration are fixed and will be used for all connections. The reason for having a special method for SSL is to enable to distinguish between SSL and non secure connection from one hand, and yet to be able to deprecate in the future the special method for SSL without deprecate the 'regular' method as well.

This method only return text as content type.

Parameters:
url - The URL represents the remote object on the World Wide Web from which the content was retrieved from.
method - The method to use in the url request. (GET,POST,PUT etc). The default (if null is retrieved) is GET.
reqPropertiesKeys - The general request properties keys.
reqPropertiesVals - The general request properties values. NOTE!! that the reqPropertiesKeys.length and reqPropertiesVals.length must be equal or an IllegalArgumentException will be thrown.
allowCookies - If true will allow cookies to be stored. If false, will block all cookies.
allowRedirect - If true will allow redirection. If false, will get the empty page.
usecaches - a boolean indicating whether or not to allow caching. Some protocols do caching of documents. Occasionally, it is important to be able to "tunnel through" and ignore the caches (e.g., the "reload" button in a browser). If the UseCaches flag on a connection is true, the connection is allowed to use whatever caches it can. If false, caches are to be ignored. The default value defaults to true.
ifModifiedSince - some protocols support skipping the fetching of the object unless the object has been modified more recently than a certain time. A nonzero value gives a time as the number of milliseconds since January 1, 1970, GMT. The object is fetched only if it has been modified more recently than that time. The default value of this field is 0, indicating that the fetching must always occur.
basicAuthenticatedUserName - If basic authentication in the target web site is needed, the value will be the user name required.
basicAuthenticatedPassword - If basic authentication in the target web site is needed, the value will be the password required. Note!! null value in one or two params: basicAuthenticatedUserName or basicAuthenticatedPassword will ignore any basic authentication.
Returns:
The URL's text content. In case of failure the value will be the status code.
Throws:
IOException - if an I/O error occurs while getting the content.
UnknownServiceException - if the content type isn't text.
Since:
6.0
See Also:
URLConnection.getContent(Class[] classes), URLConnection.setRequestProperty(String key,String value), URLConnection.setUseCaches(boolean usecaches), URLConnection.setIfModifiedSince(long ifmodifiedsince)

getPageInResponse

void getPageInResponse(String url,
                       IPortalComponentResponse response)
Deprecated. 

getPageInResponse

Parameters:
url -
response -

getPageInString

String getPageInString(String url)
Deprecated. 

getPageInString

Parameters:
url -
Returns:
the page in simple String

getSSLProperties

Properties getSSLProperties()
Returns the SSL properties as configured and loaded by the portal service. Among others, contains keystore, truststore, keystoretype and debug information.

Returns:
SSL properties.
Since:
6.0
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] EP-RUNTIME [sap.com] tc/ep/connectivity/services/api api EP-PIN


Copyright 2015 SAP AG Complete Copyright Notice