electric.webserver.messages.ssl
Class SSLMessageFactory

java.lang.Object
  extended byelectric.webserver.messages.ssl.SSLMessageFactory
All Implemented Interfaces:
IEXMLLoggingConstants, IGLUELoggingConstants, IHTTPConstants, ILoggingConstants, IMessageFactory

public class SSLMessageFactory
extends java.lang.Object
implements IMessageFactory, IHTTPConstants, IGLUELoggingConstants

SSLRequestFactory converts incoming IChannels into servlet requests and responses. SSL requests expose details of the SSL connect as request properties.

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
SSLMessageFactory()
           
 
Method Summary
 InboundHTTPRequest createRequest(IChannel channel)
          Create a new servlet request customized with special SSL request attributes.
 OutboundHTTPResponse createResponse(IChannel channel, InboundHTTPRequest request)
          Create a servlet response based on the given channel and request.
 boolean matches(java.lang.String protocol)
           
static void setConvertCertificates(boolean convertCertificates)
          Set to false to disable the servlet-spec compliant behavior of converting the javax.security.cert Certificates from the SSL layer into old-style java.security.cert.Certificates.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SSLMessageFactory

public SSLMessageFactory()
Method Detail

matches

public boolean matches(java.lang.String protocol)
Specified by:
matches in interface IMessageFactory
Parameters:
protocol -
Returns:
true if this factory applies to the given protocol.

createRequest

public InboundHTTPRequest createRequest(IChannel channel)
                                 throws java.io.IOException
Create a new servlet request customized with special SSL request attributes. See servlet spec 2.3, SRV.4.7, SRV.12.5.4, SRV.12.8.

Specified by:
createRequest in interface IMessageFactory
Parameters:
channel -
Returns:
a new ssl-customized http servlet request.
Throws:
java.io.IOException

createResponse

public OutboundHTTPResponse createResponse(IChannel channel,
                                           InboundHTTPRequest request)
Description copied from interface: IMessageFactory
Create a servlet response based on the given channel and request. If the request is null, assume that there is an error condition and create an appropriate http error response. The error response will be returned directly to the client without being dispatched to any user servlet. If null is returned, the channel will be closed immediately with no response at all returned to the client.

This is an internal GLUE api, and is subject to change without notice across minor revisions.

Specified by:
createResponse in interface IMessageFactory
Parameters:
channel -
request -
Returns:
a new http servlet resposne.

setConvertCertificates

public static void setConvertCertificates(boolean convertCertificates)
Set to false to disable the servlet-spec compliant behavior of converting the javax.security.cert Certificates from the SSL layer into old-style java.security.cert.Certificates. This saves time, and makes more sense, but the default is to be spec compliant.

Parameters:
convertCertificates -


copyright© 2001-2004 by webMethods All Rights Reserved.