flex.messaging.services.http
Class HTTPProxyAdapter

java.lang.Object
  extended by flex.management.ManageableComponent
      extended by flex.messaging.services.ServiceAdapter
          extended by flex.messaging.services.http.HTTPProxyAdapter
All Implemented Interfaces:
Manageable, FlexComponent, FlexConfigurable
Direct Known Subclasses:
SOAPProxyAdapter

public class HTTPProxyAdapter
extends ServiceAdapter

Adapter class for proxy services.


Field Summary
 
Fields inherited from class flex.messaging.services.ServiceAdapter
LOG_CATEGORY
 
Constructor Summary
HTTPProxyAdapter()
          Constructs an unmanaged HTTPProxyAdapter instance.
HTTPProxyAdapter(boolean enableManagement)
          Constructs a HTTPProxyAdapter instance.
 
Method Summary
 HTTPConnectionManagerSettings getConnectionManagerSettings()
          Returns HTTPConnectionManagerSettings.
 int getCookieLimit()
          Returns the cookie-limit property.
 ExternalProxySettings getExternalProxySettings()
          Returns ExternalProxySettings.
 void initialize(String id, ConfigMap properties)
          Initializes the HTTPProxyAdapter with the properties.
 Object invoke(Message msg)
          Handle a data message intended for this adapter.
 boolean isAllowLaxSSL()
          Returns allow-lax-ssl property.
 boolean isContentChunked()
          Returns the content-chunked property.
 void setAllowLaxSSL(boolean allowLaxSSL)
          Sets allow-lax-ssl property which determines if self-signed certificates are allowed; should not be used in production.
 void setConnectionManagerSettings(HTTPConnectionManagerSettings connectionManagerSettings)
          Sets HTTPConnectionManagerSettings.
 void setContentChunked(boolean contentChunked)
          Sets the content-chunked property.
 void setCookieLimit(int cookieLimit)
          Sets the cookie-limit property.
 void setDestination(Destination destination)
          Casts the Destination into HTTPProxyDestination and calls super.setDestination.
 void setExternalProxySettings(ExternalProxySettings externalProxy)
          Sets ExternalProxySettings.
 
Methods inherited from class flex.messaging.services.ServiceAdapter
getAdapterState, getDestination, handlesSubscriptions, manage, setAdapterState, start, stop
 
Methods inherited from class flex.management.ManageableComponent
getControl, getId, getParent, isManaged, isStarted, isValid, setControl, setId, setManaged, setParent
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTTPProxyAdapter

public HTTPProxyAdapter()
Constructs an unmanaged HTTPProxyAdapter instance.


HTTPProxyAdapter

public HTTPProxyAdapter(boolean enableManagement)
Constructs a HTTPProxyAdapter instance.

Parameters:
enableManagement - true if the HTTPProxyAdapter has a corresponding MBean control for management; otherwise false.
Method Detail

initialize

public void initialize(String id,
                       ConfigMap properties)
Initializes the HTTPProxyAdapter with the properties.

 <connection-manager>
     <max-total-connections>100</max-total-connections>
     <default-max-connections-per-host>2</default-max-connections-per-host>
     <connection-timeout>0</connection-timeout>
     <socket-timeout></socket-timeout>
     <stale-checking-enabled></stale-checking-enabled>
     <send-buffer-size></send-buffer-size>
     <receive-buffer-size></receive-buffer-size>
     <tcp-no-delay>true</tcp-no-delay>
     <linger>-1</linger>
     <max-per-host>
           <host>...</host>
           <port>80</port>
           <protocol>http</protocol>
           <protocol-factory class="flex.messaging.services.http.ProtocolFactory">
               <properties>...</properties>
           </protocol-factory>
           <max-connections>2</max-connections>
           <proxy>
               <host>...</host>
               <port>80</port>
           </proxy>
           <local-address>...</local-address>
           <virtual-host>...</virtual-host>
     </max-per-host>
  </connection-manager>
  <cookie-limit>200</cookie-limit>
  <allow-lax-ssl>false</allow-lax-ssl>
  <content-chunked>false</content-chunked>
  <external-proxy>
      <server>...</server>
      <port>80</port>
      <nt-domain>...</nt-domain>
      <username>...</username>
      <password>...</password>
  </external-proxy>
  

Specified by:
initialize in interface FlexConfigurable
Overrides:
initialize in class ManageableComponent
Parameters:
id - The id of the destination.
properties - Properties for the Destination.

isAllowLaxSSL

public boolean isAllowLaxSSL()
Returns allow-lax-ssl property.

Returns:
true if allow-lax-ssl property is true; otherwise false.

setAllowLaxSSL

public void setAllowLaxSSL(boolean allowLaxSSL)
Sets allow-lax-ssl property which determines if self-signed certificates are allowed; should not be used in production. Default false.

Parameters:
allowLaxSSL - Whether lax SSL should be allowed.

isContentChunked

public boolean isContentChunked()
Returns the content-chunked property.

Returns:
true if content-chunked property is true; otherwise false.

setContentChunked

public void setContentChunked(boolean contentChunked)
Sets the content-chunked property. Default false.

Parameters:
contentChunked - The content-chunked property.

getCookieLimit

public int getCookieLimit()
Returns the cookie-limit property.

Returns:
The cookie-limit property.

setCookieLimit

public void setCookieLimit(int cookieLimit)
Sets the cookie-limit property. Default 200.

Parameters:
cookieLimit - The cookie limit for the proxy.

setDestination

public void setDestination(Destination destination)
Casts the Destination into HTTPProxyDestination and calls super.setDestination.

Overrides:
setDestination in class ServiceAdapter
Parameters:
destination - The HTTP proxy destination.

getExternalProxySettings

public ExternalProxySettings getExternalProxySettings()
Returns ExternalProxySettings.

Returns:
the ExternalProxySettings

setExternalProxySettings

public void setExternalProxySettings(ExternalProxySettings externalProxy)
Sets ExternalProxySettings.

Parameters:
externalProxy - The external proxy settings.

getConnectionManagerSettings

public HTTPConnectionManagerSettings getConnectionManagerSettings()
Returns HTTPConnectionManagerSettings.

Returns:
the HTTPConnectionManagerSettings

setConnectionManagerSettings

public void setConnectionManagerSettings(HTTPConnectionManagerSettings connectionManagerSettings)
Sets HTTPConnectionManagerSettings.

Parameters:
connectionManagerSettings - The connection manager settings.

invoke

public Object invoke(Message msg)
Handle a data message intended for this adapter. This method is responsible for handling the message and returning a result (if any). The return value of this message is used as the body of the acknowledge message returned to the client. It may be null if there is no data being returned for this message.

Typically the data content for the message is stored in the body property of the message. The headers of the message are used to store fields which relate to the transport of the message. The type of operation is stored as the operation property of the message.

Specified by:
invoke in class ServiceAdapter
Parameters:
msg - the message as sent by the client intended for this adapter
Returns:
the body of the acknowledge message (or null if there is no body)
See Also:
Message, AsyncMessage


Copyright © 2008 Adobe Systems Inc. All Rights Reserved.

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/blazeds/1/javadoc/flex/messaging/services/http/HTTPProxyAdapter.html