flex.messaging.services
Class HTTPProxyService

java.lang.Object
  extended by flex.management.ManageableComponent
      extended by flex.messaging.services.AbstractService
          extended by flex.messaging.services.HTTPProxyService
All Implemented Interfaces:
Manageable, FlexComponent, FlexConfigurable, Service

public class HTTPProxyService
extends AbstractService

The HttpProxyService replaces the Flex 1.5 Proxy. It decouples the details of how the client contacts the message broker by accepting an HTTPMessage type which can be sent over any channel.

See Also:
HTTPMessage

Field Summary
static String LOG_CATEGORY
          Log category for HTTPProxyService.
 
Fields inherited from class flex.messaging.services.AbstractService
LOG_CATEGORY_STARTUP_DESTINATION
 
Constructor Summary
HTTPProxyService()
          Constructs an unmanaged HTTPProxyService.
HTTPProxyService(boolean enableManagement)
          Constructs a HTTPProxyService with the indicated management.
 
Method Summary
 void addDestination(Destination destination)
          Casts the Destination into HTTPProxyDestination and calls super.addDestination.
 Destination createDestination(String id)
          Creates a HTTPProxyDestination instance, sets its id, sets it manageable if the AbstractService that created it is manageable, and sets its Service to the AbstractService that created it.
 Object serviceMessage(Message msg)
          Processes messages of type HTTPMessage by invoking the requested destination's adapter.
 
Methods inherited from class flex.messaging.services.AbstractService
addDefaultChannel, describeService, getDefaultAdapter, getDefaultChannels, getDestination, getDestination, getDestinations, getMessageBroker, getRegisteredAdapters, registerAdapter, removeDefaultChannel, removeDestination, serviceCommand, setDefaultAdapter, setDefaultChannels, setId, setMessageBroker, start, stop, unregisterAdapter
 
Methods inherited from class flex.management.ManageableComponent
getControl, getId, getParent, initialize, isManaged, isStarted, isValid, setControl, setManaged, setParent
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface flex.messaging.services.Service
getId
 
Methods inherited from interface flex.management.Manageable
getControl, isManaged, setControl, setManaged
 
Methods inherited from interface flex.messaging.FlexComponent
isStarted
 
Methods inherited from interface flex.messaging.FlexConfigurable
initialize
 

Field Detail

LOG_CATEGORY

public static final String LOG_CATEGORY
Log category for HTTPProxyService.

See Also:
Constant Field Values
Constructor Detail

HTTPProxyService

public HTTPProxyService()
Constructs an unmanaged HTTPProxyService.


HTTPProxyService

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

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

createDestination

public Destination createDestination(String id)
Creates a HTTPProxyDestination instance, sets its id, sets it manageable if the AbstractService that created it is manageable, and sets its Service to the AbstractService that created it.

Specified by:
createDestination in interface Service
Overrides:
createDestination in class AbstractService
Parameters:
id - The id of the HTTPProxyDestination.
Returns:
The Destination instanced created.

addDestination

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

Specified by:
addDestination in interface Service
Overrides:
addDestination in class AbstractService
Parameters:
destination - The Destination instance to be added.

serviceMessage

public Object serviceMessage(Message msg)
Processes messages of type HTTPMessage by invoking the requested destination's adapter.

Specified by:
serviceMessage in interface Service
Specified by:
serviceMessage in class AbstractService
Parameters:
msg - The message sent by the MessageBroker.
Returns:
The result of the service.


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