electric.http
Class InboundHTTPResponse

java.lang.Object
  extended byelectric.http.InboundHTTPResponse
All Implemented Interfaces:
IEXMLLoggingConstants, IGLUELoggingConstants, IHTTPConstants, ILoggingConstants

public final class InboundHTTPResponse
extends java.lang.Object
implements IHTTPConstants, IGLUELoggingConstants

InboundHTTPResponse is an implementation of the standard HttpServletResponse interface.

Author:
webMethods

Field Summary
 
Fields inherited from interface electric.util.http.IHTTPConstants
ACCEPT_LANGUAGE, ACCEPT_RANGES, APPLICATION_BINARY, APPLICATION_OCTET_STREAM, ASCII, AUTHORIZATION, BASIC, BOUNDARY, CHARSET_EQUALS, CHUNKED, CLOSE, COLON_SLASH_SLASH, CONNECT, CONNECTION, CONTENT_ID, CONTENT_LANGUAGE, CONTENT_LENGTH, CONTENT_LOCATION, CONTENT_TYPE, CONTINUATION_STATUS, CONTINUE_EXPECTATION, COOKIE, COOKIE_LISTENER, DATE, DEFAULT_CONTENT_TYPE, DEFAULT_HTTP_CHARSET, DEFAULT_HTTPS_PORT, DEFAULT_MIME_TYPE, DEFAULT_PROXY_PORT, DIGEST, EOL, EXPECT, EXPECT_HEADER, FORM_URLENCODED, GET, GLUE_SESSION, HEAD, HOST, HTTP_1_0, HTTP_1_1, HTTP_PROTOCOL, HTTPS_PROTOCOL, IF_MODIFIED_SINCE, KEEP_ALIVE, LAST_MODIFIED, LOCATION, MD5_HASH, MIME_BOUNDARY, MIME_VERSION, MULTIPART_CONTENT_TYPE, OK, POST, PROXY_AUTHORIZATION, RANGE, SC_CONTINUE, SC_MOVED, SC_MOVED_PERMANENTLY, SC_OK, SC_PROXY_AUTHENTICATION_REQUIRED, SC_UNAUTHORIZED, SEPARATOR, SERVER, SERVER_PREFIX, SERVER_TYPE, SET_COOKIE_0, SET_COOKIE_1, SLASH, START, TEXT_HTML, TEXT_PLAIN, TEXT_XML, TEXT_XML_UTF_8, TRANSFER_ENCODING, USER_AGENT, WWW_AUTHENTICATE
 
Fields inherited from interface electric.glue.IGLUELoggingConstants
CLUSTER_DEBUG_EVENT, CLUSTER_EVENT, CONSOLE_DEBUG_EVENT, DEPLOY_EVENT, DETECTORS_EVENT, HTTP_EVENT, JMS_EVENT, REBINDING_EVENT, SECURITY_DEBUG_EVENT, SECURITY_DETAIL_EVENT, SERVLET_EVENT, SOAP_EVENT
 
Fields inherited from interface electric.xml.IEXMLLoggingConstants
MAPPING_EVENT, SCHEMA_EVENT
 
Fields inherited from interface electric.util.log.ILoggingConstants
CLASSLOADER_EVENT, COMMAND_EVENT, COMMENT_EVENT, CONFIG_EVENT, DEBUG_EVENT, ELECTRIC_LOGGING_PROPERTY, ERROR_EVENT, EXCEPTION_EVENT, FILE_EVENT, LICENSE_EVENT, RESOURCES_EVENT, SECURITY_EVENT, SHUTDOWN_EVENT, SOURCE_EVENT, SQL_EVENT, STARTUP_EVENT, WARNING_EVENT
 
Constructor Summary
InboundHTTPResponse(HTTPMessage httpMessage)
           
InboundHTTPResponse(OutboundHTTPRequest request)
           
 
Method Summary
 void clearHeaders()
          Clear all of my headers.
 void close()
           
 boolean containsHeader(java.lang.String name)
          Return true if there is at least one header with the specified name.
 byte[] getBytes()
           
 int getContentLength()
          Return my content length, or -1 if none is defined.
 java.lang.String getContentType()
          Return my content type, or null if none is defined.
 ClientCookie[] getCookies(java.lang.String requestURI)
          Return an array of all the cookies, or null if there is none.
 java.lang.String getHeader(java.lang.String name)
          Return the header with the specified name.
 java.util.Enumeration getHeaderNames()
          Return an enumeration over all the header names.
 java.util.Enumeration getHeaders(java.lang.String name)
          Return an enumeration over all the headers with the specified name.
 XURL getHost()
           
 java.io.InputStream getInputStream()
           
 int getIntHeader(java.lang.String name)
          Return the value of the header with the specified name, or -1 if none is defined.
 java.lang.String getMessage()
          Return the message.
 int getStatus()
          Return the status.
 java.lang.String getVersion()
           
 boolean isKeepAlive()
           
 boolean isOK()
           
 void readHeaders()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InboundHTTPResponse

public InboundHTTPResponse(OutboundHTTPRequest request)
Parameters:
request -

InboundHTTPResponse

public InboundHTTPResponse(HTTPMessage httpMessage)
Parameters:
httpMessage -
Method Detail

toString

public java.lang.String toString()

getVersion

public java.lang.String getVersion()

getStatus

public int getStatus()
Return the status.


getMessage

public java.lang.String getMessage()
Return the message.


isOK

public boolean isOK()

getHost

public XURL getHost()

readHeaders

public void readHeaders()
                 throws java.io.IOException
Throws:
java.io.IOException

clearHeaders

public void clearHeaders()
Clear all of my headers.


getHeader

public java.lang.String getHeader(java.lang.String name)
Return the header with the specified name. If there is more than one header with this name, return the first one.

Parameters:
name - The name.

getHeaders

public java.util.Enumeration getHeaders(java.lang.String name)
Return an enumeration over all the headers with the specified name.

Parameters:
name - The name.

getIntHeader

public int getIntHeader(java.lang.String name)
Return the value of the header with the specified name, or -1 if none is defined.

Parameters:
name - The name.

containsHeader

public boolean containsHeader(java.lang.String name)
Return true if there is at least one header with the specified name.

Parameters:
name - The name.

getHeaderNames

public java.util.Enumeration getHeaderNames()
Return an enumeration over all the header names.


getContentLength

public int getContentLength()
Return my content length, or -1 if none is defined.


getContentType

public java.lang.String getContentType()
Return my content type, or null if none is defined.


isKeepAlive

public boolean isKeepAlive()

getCookies

public ClientCookie[] getCookies(java.lang.String requestURI)
Return an array of all the cookies, or null if there is none.

Parameters:
requestURI -

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException

getBytes

public byte[] getBytes()
                throws java.io.IOException
Throws:
java.io.IOException


copyright© 2001-2004 by webMethods All Rights Reserved.