flex.messaging.services.http
Class HTTPProxyDestination

java.lang.Object
  extended by flex.management.ManageableComponent
      extended by flex.messaging.Destination
          extended by flex.messaging.services.http.HTTPProxyDestination
All Implemented Interfaces:
Manageable, FlexComponent, FlexConfigurable, Serializable

public class HTTPProxyDestination
extends Destination

Subclass of Destination which provides HTTP Proxy-specific destination functionality.

See Also:
Serialized Form

Field Summary
static String LOG_CATEGORY
          Log category for HTTPProxyDestination.
 
Constructor Summary
HTTPProxyDestination()
          Constructs an unmanaged HTTPProxyDestination instance.
HTTPProxyDestination(boolean enableManagement)
          Constructs a HTTPProxyDestination with the indicated management.
 
Method Summary
 void addDynamicUrl(String dynamicUrl)
          Adds a dynamic-url or soap property.
 void addDynamicUrls(List dynamicUrls)
          Adds a list of dynamic-url or soap properties to the existing list.
 boolean allowsDynamicAuthentication()
          Returns whether dynamic authentication is allowed.
 String getDefaultUrl()
          Returns the url (or wsdl if using the SOAP) property.
 List getDynamicUrls()
          Returns the list of dynamic-url (or soap if using SOAP) properties.
 String getParsedDefaultUrl(String contextPath, String serverName, String serverPort, String serverProtocol)
          This method replaces the dynamic tokens of the default url with the specified values and returns the resulting url.
 List getParsedDynamicUrls(String contextPath)
          This method replaces all the dynamic tokens of dynamic urls using the specified context path, when necessary.
 ProtocolFactory getProtocolFactory()
          Returns the protocol-factory property.
 String getRemotePassword()
          Returns the remote-password property.
 String getRemoteUsername()
          Gets the remote-username property.
 void initialize(String id, ConfigMap properties)
          Initializes the HTTPProxyDestination with the properties.
 boolean isUseCustomAuthentication()
          Returns the use-custom-auth property.
 void setDefaultUrl(String defaultUrl)
          Sets the url or wsdl property.
 void setProtocolFactory(ProtocolFactory protocolFactory)
          Sets the protocol-factory property.
 void setRemotePassword(String remotePassword)
          Sets the remote-password property.
 void setRemoteUsername(String remoteUsername)
          Sets the remote-username property.
 void setService(Service service)
          Casts the Service into HTTPProxyService and calls super.setService.
 void setUseCustomAuthentication(boolean useCustomAuthentication)
          Sets the use-custom-auth property.
 
Methods inherited from class flex.messaging.Destination
addChannel, addExtraProperty, createAdapter, describeDestination, getAdapter, getChannels, getExtraProperty, getNetworkSettings, getSecurityConstraint, getService, getServiceType, isBackendShared, isClustered, removeChannel, setAdapter, setChannels, setId, setNetworkSettings, setSecurityConstraint, setSecurityConstraint, start, stop
 
Methods inherited from class flex.management.ManageableComponent
getControl, getId, getParent, isManaged, isStarted, isValid, setControl, setManaged, setParent
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG_CATEGORY

public static final String LOG_CATEGORY
Log category for HTTPProxyDestination.

See Also:
Constant Field Values
Constructor Detail

HTTPProxyDestination

public HTTPProxyDestination()
Constructs an unmanaged HTTPProxyDestination instance.


HTTPProxyDestination

public HTTPProxyDestination(boolean enableManagement)
Constructs a HTTPProxyDestination with the indicated management.

Parameters:
enableManagement - true if the HTTPProxyDestination is manageable; otherwise false.
Method Detail

initialize

public void initialize(String id,
                       ConfigMap properties)
Initializes the HTTPProxyDestination with the properties.
 <url>...</url> (HTTP)
   or
 <wsdl>...</wsdl> (SOAP)
 
 <dynamic-url>...</dynamic-url>* (HTTP)
   or
 <soap>...</soap>* (SOAP)
 
 <remote-username>...</remote-username>
 <remote-password>...</remote-password>
 <use-custom-authentication>true</use-custom-authentication>
 
 <protocol-factory class="flex.messaging.services.http.ProtocolFactory">
     <properties>...</properties>
 </protocol-factory>
 

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

getDefaultUrl

public String getDefaultUrl()
Returns the url (or wsdl if using the SOAP) property.

Returns:
The url or wsdl property.

setDefaultUrl

public void setDefaultUrl(String defaultUrl)
Sets the url or wsdl property.

Parameters:
defaultUrl - The url or wsdl property.

getDynamicUrls

public List getDynamicUrls()
Returns the list of dynamic-url (or soap if using SOAP) properties.

Returns:
The list of dynamic-url or soap properties.

addDynamicUrl

public void addDynamicUrl(String dynamicUrl)
Adds a dynamic-url or soap property. The developer configures a list of dynamic URLs that are allowed for Proxy Service destinations. The dynamic URL may contain * and ? wildcards, and must start with either "http://" or "https://". Dynamic URLs are compared in a case insensitive manner.

Parameters:
dynamicUrl - - A wildcard pattern used to match dynamic URLs

addDynamicUrls

public void addDynamicUrls(List dynamicUrls)
Adds a list of dynamic-url or soap properties to the existing list.

Parameters:
dynamicUrls - A list of dynamic-url or soap properties.

getProtocolFactory

public ProtocolFactory getProtocolFactory()
Returns the protocol-factory property. A ProtocolFactory implementation allows the developer to customize how the HTTP Proxy Service communicates with a 3rd party endpoint.

Returns:
The protocol-factory property.

setProtocolFactory

public void setProtocolFactory(ProtocolFactory protocolFactory)
Sets the protocol-factory property.

Parameters:
protocolFactory - The protocol-factory property.

getRemotePassword

public String getRemotePassword()
Returns the remote-password property.

Returns:
The remote-password property.

setRemotePassword

public void setRemotePassword(String remotePassword)
Sets the remote-password property.

Parameters:
remotePassword - The remote-password property.

getRemoteUsername

public String getRemoteUsername()
Gets the remote-username property.

Returns:
The remote-username property.

setRemoteUsername

public void setRemoteUsername(String remoteUsername)
Sets the remote-username property.

Parameters:
remoteUsername - The remote-username property.

setService

public void setService(Service service)
Casts the Service into HTTPProxyService and calls super.setService.

Overrides:
setService in class Destination
Parameters:
service - The HTTP proxy service.

isUseCustomAuthentication

public boolean isUseCustomAuthentication()
Returns the use-custom-auth property.

Returns:
true if use-custom-auth is enabled; otherwise false.

setUseCustomAuthentication

public void setUseCustomAuthentication(boolean useCustomAuthentication)
Sets the use-custom-auth property.

Parameters:
useCustomAuthentication - The use-custom-auth property.

getParsedDefaultUrl

public String getParsedDefaultUrl(String contextPath,
                                  String serverName,
                                  String serverPort,
                                  String serverProtocol)
This method replaces the dynamic tokens of the default url with the specified values and returns the resulting url.

Parameters:
contextPath - The context path to be used in dynamic url replacement.
serverName - The server name to be used in dynamic url replacement.
serverPort - The server port to be used in dynamic url replacement.
serverProtocol - The server protocol to be used in dynamic url replacement.
Returns:
The fully parsed url where the dynamic tokens have been replaced.

getParsedDynamicUrls

public List getParsedDynamicUrls(String contextPath)
This method replaces all the dynamic tokens of dynamic urls using the specified context path, when necessary.

Parameters:
contextPath - The context path to be used in dynamic url replacement.
Returns:
List List of fully parsed urls where the dynamic tokens have been replaced.

allowsDynamicAuthentication

public boolean allowsDynamicAuthentication()
Returns whether dynamic authentication is allowed.

Returns:
Whether dynamic authentication is allowed.


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/HTTPProxyDestination.html