Sun Adapter for HTTP API

com.stc.connector.appconn.http
Interface HTTPResult


public interface HTTPResult

This interface represents an HTTP application result.

Version:
$Revision: 1.4 $

Method Summary
 int countHeader()
          Gets the header count.
 byte[] getBinaryResult()
          Gets the binary result content.
 HTTPHeader getHeader(int i)
          Gets the header at the specified index.
 int getResponseCode()
          Returns the HTTP status code.
 java.lang.String getResponseMessage()
          Returns the HTTP response message.
 java.lang.String getTextResult()
          Gets the text result content
 boolean hasResult()
          Checks whether the result content exists.
 boolean isTextResult()
          Checks whether the result content is text or binary.
 

Method Detail

getResponseCode

int getResponseCode()
                    throws HTTPApplicationException
Returns the HTTP status code.

Returns:
The HTTP response code.
Throws:
HTTPApplicationException - upon error.

getResponseMessage

java.lang.String getResponseMessage()
                                    throws HTTPApplicationException
Returns the HTTP response message.

Returns:
The HTTP status message or null if not status message.
Throws:
HTTPApplicationException - upon error.

hasResult

boolean hasResult()
                  throws HTTPApplicationException
Checks whether the result content exists.

Returns:
The boolean true if there is result content.
Throws:
HTTPApplicationException - upon error.

isTextResult

boolean isTextResult()
                     throws HTTPApplicationException
Checks whether the result content is text or binary.

Returns:
The boolean true if the result content is text; otherwise the result content is binary if false.
Throws:
HTTPApplicationException - upon error.

getBinaryResult

byte[] getBinaryResult()
                       throws HTTPApplicationException
Gets the binary result content.

Returns:
The binary result content.
Throws:
HTTPApplicationException - upon error.

getTextResult

java.lang.String getTextResult()
                               throws HTTPApplicationException
Gets the text result content

Returns:
The text result content.
Throws:
HTTPApplicationException - upon error.

countHeader

int countHeader()
                throws HTTPApplicationException
Gets the header count.

Returns:
The number of headers returned in the result.
Throws:
HTTPApplicationException - upon error.

getHeader

HTTPHeader getHeader(int i)
                     throws HTTPApplicationException
Gets the header at the specified index.

Parameters:
i - The header index.
Returns:
The Header instance at index i.
Throws:
HTTPApplicationException - upon error.

Sun Adapter for HTTP API

Copyright © 2008 Sun Microsystems, Inc. All Rights Reserved.