ProgramixGenericLib v5.0.1

com.programix.da2.bridge.http
Class HttpDABridgeProcessor

java.lang.Object
  extended by com.programix.da2.bridge.http.HttpDABridgeProcessor
All Implemented Interfaces:
DABridgeProcessor

public class HttpDABridgeProcessor
extends Object
implements DABridgeProcessor

This implementation of DABridgeProcessor that serializes DABridgeRequest's and DABridgeResponse's over a the HTTP (or HTTPS) protocol to a servlet. The actual type of object serialized in both directions is a TransferWrapper.

Author:
Paul Hyde

Field Summary
static int COMPRESSION_THRESHOLD_DEFAULT_VALUE
           
static String COMPRESSION_THRESHOLD_KEY
          This constant is defined as "bridge.compression.threshold" and is used as the optional key in the config ValueMap to retrieve the minimum number of bytes to be sent up before compression is used.
static String CONTENT_TYPE_DEFAULT_VALUE
           
static String CONTENT_TYPE_KEY
          This constant is defined as "bridge.content-type" and is used as the optional key in the config ValueMap to retrieve the Content-Type to send up to the server.
static String SERVLET_URL_KEY
          This constant is defined as "bridge.servlet.url" and is used as the key in the config ValueMap to retrieve the string representation of the URL to use to talk to the server.
 
Constructor Summary
HttpDABridgeProcessor()
           
 
Method Summary
 void init(ValueMap config)
          The required key needed in the config is SERVLET_URL_KEY.
 DABridgeResponse process(DABridgeRequest req)
           
 void shutdown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVLET_URL_KEY

public static final String SERVLET_URL_KEY
This constant is defined as "bridge.servlet.url" and is used as the key in the config ValueMap to retrieve the string representation of the URL to use to talk to the server. If the URL starts with "https" then the communication will be encrypted.

See Also:
Constant Field Values

CONTENT_TYPE_KEY

public static final String CONTENT_TYPE_KEY
This constant is defined as "bridge.content-type" and is used as the optional key in the config ValueMap to retrieve the Content-Type to send up to the server. It defaults to CONTENT_TYPE_DEFAULT_VALUE if not present in the configuration.

See Also:
Constant Field Values

CONTENT_TYPE_DEFAULT_VALUE

public static final String CONTENT_TYPE_DEFAULT_VALUE
See Also:
Constant Field Values

COMPRESSION_THRESHOLD_KEY

public static final String COMPRESSION_THRESHOLD_KEY
This constant is defined as "bridge.compression.threshold" and is used as the optional key in the config ValueMap to retrieve the minimum number of bytes to be sent up before compression is used. It defaults to COMPRESSION_THRESHOLD_DEFAULT_VALUE if not present in the configuration.

See Also:
Constant Field Values

COMPRESSION_THRESHOLD_DEFAULT_VALUE

public static final int COMPRESSION_THRESHOLD_DEFAULT_VALUE
See Also:
Constant Field Values
Constructor Detail

HttpDABridgeProcessor

public HttpDABridgeProcessor()
Method Detail

init

public void init(ValueMap config)
          throws DAException
The required key needed in the config is SERVLET_URL_KEY.

Specified by:
init in interface DABridgeProcessor
Throws:
DAException

shutdown

public void shutdown()
Specified by:
shutdown in interface DABridgeProcessor

process

public DABridgeResponse process(DABridgeRequest req)
                         throws DAException
Specified by:
process in interface DABridgeProcessor
Throws:
DAException

ProgramixGenericLib v5.0.1

Copyright © 2001-2009 Programix Incorporated. All rights reserved. ProgramixGenericLib is free and is OSI Certified Open Source Software under the BSD license.