electric.http
Class OutboundHTTPRequest

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

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

OutboundHTTPRequest is an implementation of the standard HttpServletRequest 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
OutboundHTTPRequest()
           
OutboundHTTPRequest(IChannel channel)
           
 
Method Summary
 void addCookie(ClientCookie cookie)
          Add the cookie.
 void addHeader(java.lang.String name, java.lang.String value)
          Add a header with the specified name and value.
 boolean canResendSource()
           
 void flush()
           
 void flushHeader()
           
 byte[] get(java.lang.String path, Context context)
          Read the bytes at the specified path using an HTTP GET.
 IChannel getChannel()
           
 MIMEHeaders getHeaders()
           
 java.lang.String getMethod()
          Return the method.
 java.lang.String getQueryString()
          Return the query string, or null if there is none.
 java.lang.String getRequestURI()
          Return the request URI.
 ISource getSource()
           
 java.lang.String getVersion()
           
 boolean isKeepAlive()
           
 InboundHTTPResponse send(XURL endpoint, int maxTries, Context context)
           
 void setChannel(IChannel channel)
           
 void setContentLength(int length)
           
 void setContentType(java.lang.String type)
          Set my content type.
 void setFlushedHeader(boolean flag)
           
 void setHeader(java.lang.String name, java.lang.String value)
          Set a header with the specified name and value.
 void setMethod(java.lang.String method)
          Set the method.
 void setPath(XURL xurl)
          Reset to point to the XURL specified.
 void setQueryString(java.lang.String query)
          Set the query string.
 void setRequestURI(java.lang.String uri)
          Set the request URI.
 void setSource(ISource source)
           
 void setVersion(java.lang.String version)
           
 java.lang.String toString()
           
 void writeHeader()
           
 void writeSource()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OutboundHTTPRequest

public OutboundHTTPRequest()

OutboundHTTPRequest

public OutboundHTTPRequest(IChannel channel)
Parameters:
channel -
Method Detail

toString

public java.lang.String toString()

getChannel

public IChannel getChannel()

setChannel

public void setChannel(IChannel channel)
Parameters:
channel -

setVersion

public void setVersion(java.lang.String version)
Parameters:
version -

getVersion

public java.lang.String getVersion()

getMethod

public java.lang.String getMethod()
Return the method.


setMethod

public void setMethod(java.lang.String method)
Set the method.

Parameters:
method - The new value.

getRequestURI

public java.lang.String getRequestURI()
Return the request URI.


setRequestURI

public void setRequestURI(java.lang.String uri)
Set the request URI.

Parameters:
uri - The new value.

getQueryString

public java.lang.String getQueryString()
Return the query string, or null if there is none.


setQueryString

public void setQueryString(java.lang.String query)
Set the query string.

Parameters:
query - The new value.

isKeepAlive

public boolean isKeepAlive()

writeHeader

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

flushHeader

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

setFlushedHeader

public void setFlushedHeader(boolean flag)
Parameters:
flag -

getHeaders

public MIMEHeaders getHeaders()

setHeader

public void setHeader(java.lang.String name,
                      java.lang.String value)
Set a header with the specified name and value. If at least one header already exists with the name, replace the value of the first matching header, otherwise add a new header.

Parameters:
name - The name.
value - The value.

addHeader

public void addHeader(java.lang.String name,
                      java.lang.String value)
Add a header with the specified name and value.

Parameters:
name - The name.
value - The value.

setContentLength

public void setContentLength(int length)
Parameters:
length -

setContentType

public void setContentType(java.lang.String type)
Set my content type.

Parameters:
type - The new value.

addCookie

public void addCookie(ClientCookie cookie)
Add the cookie.

Parameters:
cookie - The cookie.

setSource

public void setSource(ISource source)
Parameters:
source -

getSource

public ISource getSource()

writeSource

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

canResendSource

public boolean canResendSource()

flush

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

send

public InboundHTTPResponse send(XURL endpoint,
                                int maxTries,
                                Context context)
                         throws java.io.IOException,
                                java.lang.SecurityException
Parameters:
endpoint -
maxTries -
context -
Throws:
java.io.IOException
java.lang.SecurityException

get

public byte[] get(java.lang.String path,
                  Context context)
           throws java.io.IOException,
                  java.lang.SecurityException
Read the bytes at the specified path using an HTTP GET.

Parameters:
path - The path.
context - The context.
Throws:
java.io.IOException - If an I/O exception occurs.
java.lang.SecurityException - If an security exception occurs.

setPath

public void setPath(XURL xurl)
Reset to point to the XURL specified.

Parameters:
xurl -


copyright© 2001-2004 by webMethods All Rights Reserved.