r6 - 19 Oct 2007 - 23:21:02 - Main.eturnerYou are here: TWiki >  Main Web > ServerConfiguration > ProtocolConnectors > HTTPOutputConnector

Object Overview

The HTTP output connector object allows AlchemyPoint Server to send content to a destination WWW server. This allows AlchemyPoint to automatically post content updates to network servers, perform asynchronous messaging over HTTP, interact with remote web APIs, etc.

This object utilizes AlchemyPoint's underlying Connector framework and thus supports a variety of rate limiting and concurrency options.

Example Object Definitions

... directly within the top-level ServerConfiguration object:

Minimal Configuration:

<HTTPOutputConnector name="WebOut1" 
                     url="http://www.test.com/cgi-bin/rest-endpoint"/>

Overview:

The above example is a HTTP output connector that accepts 'raw' WebMessages? from a HTTPFullDuplexListener, or opaque data from OpaqueMessages? and KeyValueMessages? . Opaque data is ignored and the Connector simply retrieves the url 'http://www.test.com/cgi-bin/rest-endpoint' (doing nothing with the response data). For 'raw' POST WebMessages? , data is automatically Posted to the url 'http://www.test.com/cgi-bin/rest-endpoint' (as messageBody content).


Basic Configuration:

<HTTPOutputConnector name="WebOut1" 
                     method="post"
                     outputTo="messageBody"
                     url="http://www.test.com/cgi-bin/rest-endpoint"/>

Overview:

The above example is a HTTP output connector that accepts 'raw' WebMessages? from a HTTPFullDuplexListener, or opaque data from OpaqueMessages? and KeyValueMessages? . Data received in any of these message types is automatically Posted to the url 'http://www.test.com/cgi-bin/rest-endpoint', as messageBody content.


Complex Configuration (all possible attributes shown):

<HTTPOutputConnector name="WebOut1" tags="connector http output"
                     description="example output for sending content to a destination WWW server"
                     url="http://www.test.com/cgi-bin/post-script"
                     outputTo="messageBody"
                     outputMode="append"
                     disableUrlOverride="true"
                     messageBody="userdata:"
                     method="post"
                     rateLimitDuration="60"
                     connectRateLimit="5"
                     reconnectAttempts="5"
                     reconnectInterval="60"
                     reconnectExpBackoff="true"/>

Overview:

The above example is a HTTP output connector that accepts 'raw' WebMessages? from a HTTPFullDuplexListener, or opaque data from OpaqueMessages? and KeyValueMessages? . Received Opaque/KeyValue data is appended to the pre-defined "userdata:" messageBody, and sent to the url 'http://www.test.com/cgi-bin/post-script' in the form of a HTTP Post. The disableUrlOverride option is set, meaning that received 'raw' WebMessages? will not be able to override the pre-defined output url defined for this Connector.

This connector is rate limited at 5 HTTP operation every 60 seconds, and will attempt to retry operations up to 5 times. The first retry attempt is made after a 60 second delay, with subsequent attempt delays doubling each time (120 seconds, 240, ...).

Supported Attributes

General Attributes:

  • name - (usage: required): Public name of the configuration object. This name must be globally-unique across the entire AlchemyPoint ServerConfiguration definition.

  • description - (usage: optional): Textual description of the configuration object.

  • tags - (usage: optional): Space-delimited list of one or more tags used to describe the configuration object.


Network Attributes:

  • url - (usage: mixed): The HTTP URL that should be accessed by this Connector.
    • This option is required when the Connector "outputTo" parameter is set to "messageBody".
    • This option may not be specified when the Connector "outputTo" parameter is set to "raw".

  • method - (usage: optional, default: "get"): The HTTP "method" (operation type) to utilize when accessing a remote web server.
    • This option may not be specified when the Connector "outputTo" parameter is set to "raw".

  • Supported "method" values include:
    • get - HTTP Get (this method retrieves content from web server).
    • head - HTTP Head (this method retrieves content information from web server, but not the content data).
    • post - HTTP Post (this method posts content to web server).


Object Attributes:

  • messageBody - (usage: mixed): The message body (HTTP post data) that should be utilized by this Connector when posting updates to a web server URL.
    • This option is required when the Connector "method" parameter is set to "post", and "outputTo" is set to "url".
    • This option may not be specified when the Connector "outputTo" parameter is set to "raw".
    • This option may not be specified when the Connector "method" parameter is set to "get" or "head".

  • outputTo - (usage: optional, default: "raw"): The internal element within an HTTP operation that is updated by this Connector upon receiving AlchemyPoint OpaqueMessage? , MailMessage? , or KeyValueMessage? messages. Supported 'outputTo' values are:
    • url - Received message data is written to the HTTP operation 'URL' (Public address of the desired web server / HTTP content).
      • Setting ignored on receipt of 'raw' WebMessage? messages.
    • messageBody - Received message data is written to the HTTP operation 'message body' (HTTP Post data).
      • If a static 'message body' was specified using the 'messageBody' attribute, it will be rewritten or appended depending on the 'outputMode' setting.
      • Setting ignored on receipt of 'raw' WebMessage? messages.
      • This value may not be specified when the Connector "method" parameter is set to "get" or "head".
    • raw - Connector only accepts 'raw' WebMessages? , not OpaqueMessage? or KeyValueMessage? messages.
      • The 'outputMode' attribute has no effect (it is ignored) when this setting is used.

  • outputMode - (usage: optional, default: "append"): The manner in which received OpaqueMessage? or KeyValueMessage? data is written to sent e-mail messages. Supported 'outputMode' values are:
    • append - Received message data is appended to the 'outputTo' element within sent e-mail messages.
    • rewrite - Received message data rewrites the 'outputTo' element (overwriting any static value setting) within sent e-mail messages.

  • disableUrlOverride - (usage: optional, default: "false"): If set to 'true', disables the ability for 'raw' WebMessages? ? or KeyValueMessages? ? to overwrite the static 'url' configured for this Connector.


Rate Limit Attributes:

  • rateLimitDuration - (usage: optional, default: "0"): The duration (in seconds) utilized by both the 'connectRateLimit' parameter. A value of "0" disables all rate limits for this Connector.

  • connectRateLimit - (usage: optional): The number of TCP connections that may be created by this Connector within the 'rateLimitDuration' period.


Automatic Reconnect Attributes:

  • reconnectAttempts - (usage: optional, default: "0"): The number of times (0-1000) this Connector should attempt to deliver an outbound e-mail message.

  • reconnectInterval - (usage: optional, default: "1"): The interval (1+) in seconds that the Connector should delay between redelivery attempts for sent e-mail messages.

  • reconnectExpBackoff - (usage: optional, default: "true"): Boolean setting that indicates whether the Connector should exponentially increase the reconnection interval upon each message delivery attempt (60 seconds -> 120 -> 240 -> ...)

Supported Child Configuration Elements

Headers:

  • HTTPHeaders? - (usage: optional): Listing of one or more HTTP header definitions. These will be automatically included in any HTTP operations engaged in by this Connector (whether crafted from 'raw' WebMessages? , OpaqueMessages? or KeyValueMessages? ).
    • If a received 'raw' WebMessage? contains a header that matches one of the static HTTPHeaders definitions, the static definition is used (WebMessage? header is discarded).

SSL:

  • SSLClientConfig - (usage: optional): Specifies local x.509 client certificate, private key, trusted x.509 certificate store, and other SSL-related configuration options.

Proxy Settings:

  • ProxyConfig? - (usage: optional): Specifies the local proxy configuration (HTTP, SOCKS4, SOCKS5, etc.) that should be utilized when making outbound connections.

Issues

Unresolved documentation issues: timeouts, concurrency

Edit | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r6 < r5 < r4 < r3 < r2 | More topic actions

tip TWiki Tip of the Day
WebChanges to see recent activity
Each TWiki web has a WebChanges topic that lists recent activity from all editors of the web. This page ... Read on Read more

 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback