electric.http
Class HTTPMessage

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

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

HTTPMessage.

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
 
Fields inherited from interface electric.glue.IGLUEContextConstants
ACTIVATION, APPLICATION, ATTACHMENT_STYLE, AUTH_METHOD, AUTH_PASSWORD, AUTH_SESSION_STATE, AUTH_USER, AUTHENTICATE, CLASS_LOADERS, CLASS_NAME, CLIENT_ID, CLIENT_SOCKET_READ_TIMEOUT, CONSTRUCTOR, CONTENT_TYPE, COOKIE_LISTENER, DATA_DIRECTORY, DATA_HANDLER, DATABASE, DATABASE_PERSISTENCE, DELETE, DESCRIPTION, DIME, DOC_BASE, DOCUMENT, DYNAMIC_OPERATIONS, ENCODED, ENDPOINT, FACTORY, FOLLOW_REDIRECTS, FORCE_ATTACHMENT_STYLE, FORWARD_INTERMEDIARY, GUARD, HTTP_REGISTRY_ROOT, HTTP_REQUEST, HTTP_RESPONSE, HTTP_SERVLET_CONFIG, INBOUND_SOAP_REQUEST_INTERCEPTOR, INBOUND_SOAP_RESPONSE_INTERCEPTOR, INSTRUMENTATION_LISTENER, INSTRUMENTOR, INTERFACE, INVOCATION_LISTENER, JNDI_PROPERTIES, KEEP_ALIVE, LAZY, LITERAL, LOCAL_ADDRESS, MESSAGE_NAME, METHOD, MIME, NAMESPACE, NET_EVENT_REAPER_CYCLE, NET_EVENT_REAPER_EXPIRY_PERIOD, NET_EVENT_RETRY_PERIOD, OUTBOUND_SOAP_REQUEST_INTERCEPTOR, OUTBOUND_SOAP_RESPONSE_INTERCEPTOR, PERSISTENCE_TYPE, PRIORITY, PROXY_HOST, PROXY_PASSWORD, PROXY_PORT, PROXY_USER, PUBLISH, QUERY_STRING, REALM, REGISTRY_ROOT, RESPONSE_UNREFED_ATTACHMENTS, RETURN_NAME, ROLE, RP_NAMESPACE, RPC, SERVICE, SERVICE_CONTEXT, SERVLET_NAME, SERVLET_PATH, SIGNATURE, SMART_CONNECTIONS, SOAP_ACTION, SOAP_ENCODING_STYLE, SOAP_PERSONALITY, SOAP_REQUEST, SOAP_VERSION, SSL_KEY_MANAGER, SSL_TRUST_MANAGER, STYLE, TARGET_NAMESPACE, TRANSACTION, TRANSPORT_SOURCE, UNREFED_ATTACHMENTS, USE, WSDL_NAME, WSDL_PERSONALITY, WSS_CONTEXT, XML_ENCODING, XML_INCLUDE, XML_PERSISTENCE
 
Constructor Summary
HTTPMessage(OutboundHTTPRequest request, XURL endpoint, int maxTries, Context context)
           
 
Method Summary
static void addRealmName(XURL host, java.lang.String requestURI, java.lang.String realmName)
          Update the static (host, uri) --> realm mapping
static IAuthSession createAuthSession(java.lang.String authMethod)
          Take an auth method and produce an auth session that matches it.
static IAuthSession createAuthSessionFromHeader(java.lang.String wwwAuthHeader)
          Take an auth header and produce an auth session that matches it.
 long getBytesRead()
           
 long getBytesWritten()
           
 SocketChannel getChannel()
           
static ChannelPool getChannelPool()
           
static LinkedList getChannels()
           
static PasswordCredentials getCredentials(Context context)
           
 XURL getHost()
           
static XURL getProxy(Context context)
           
static PasswordCredentials getProxyCredentials(Context context)
           
static boolean isDefaultFollowRedirects()
           
 void proxyAuthenticate(PasswordCredentials credentials)
           
 void releaseChannel()
           
 InboundHTTPResponse send()
           
static void setDefaultFollowRedirects(boolean defaultFollowRedirects)
           
static void setMaxCacheSize(int max)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTTPMessage

public HTTPMessage(OutboundHTTPRequest request,
                   XURL endpoint,
                   int maxTries,
                   Context context)
Parameters:
request -
endpoint -
maxTries -
context -
Method Detail

getHost

public XURL getHost()

send

public InboundHTTPResponse send()
                         throws java.io.IOException,
                                java.lang.SecurityException
Throws:
java.io.IOException
java.lang.SecurityException

getProxy

public static XURL getProxy(Context context)
Parameters:
context -

getBytesWritten

public long getBytesWritten()

getBytesRead

public long getBytesRead()

getChannelPool

public static ChannelPool getChannelPool()

getChannels

public static LinkedList getChannels()

setMaxCacheSize

public static void setMaxCacheSize(int max)
Parameters:
max -

releaseChannel

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

getChannel

public SocketChannel getChannel()

createAuthSession

public static IAuthSession createAuthSession(java.lang.String authMethod)
Take an auth method and produce an auth session that matches it. This factory method could be broken out into a separate factory object, but that might be overkill if we expect to only ever have two authentication methods.

Parameters:
authMethod -

createAuthSessionFromHeader

public static IAuthSession createAuthSessionFromHeader(java.lang.String wwwAuthHeader)
Take an auth header and produce an auth session that matches it. See notes on createAuthSession(). This is broken out into a factory method since it knows something about the format of auth headers.

Parameters:
wwwAuthHeader -

proxyAuthenticate

public void proxyAuthenticate(PasswordCredentials credentials)
Parameters:
credentials -

addRealmName

public static void addRealmName(XURL host,
                                java.lang.String requestURI,
                                java.lang.String realmName)
Update the static (host, uri) --> realm mapping

Parameters:
host -
requestURI -
realmName -

getCredentials

public static PasswordCredentials getCredentials(Context context)
Parameters:
context -

getProxyCredentials

public static PasswordCredentials getProxyCredentials(Context context)
Parameters:
context -

isDefaultFollowRedirects

public static boolean isDefaultFollowRedirects()

setDefaultFollowRedirects

public static void setDefaultFollowRedirects(boolean defaultFollowRedirects)
Parameters:
defaultFollowRedirects -


copyright© 2001-2004 by webMethods All Rights Reserved.