flex.messaging.services
Class RemotingService

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

public class RemotingService
extends AbstractService

The RemotingService processes RemotingMessages. A RemotingMessage informs a service adapter which method to invoke on a service, provides the input parameters for the invocation, as well as any other settings relevant to the adapter, such as RunAs credential information for secured services.

The RemotingService must be initialized with configuration settings before it can successfully process any RemotingMessages.

Note that the RemotingService translates a destination into a service name or "source" that is meaningful to an adapter before invocation.


Field Summary
static String LOG_CATEGORY
          Log category for RemotingService.
 
Fields inherited from class flex.messaging.services.AbstractService
LOG_CATEGORY_STARTUP_DESTINATION
 
Constructor Summary
RemotingService()
          Constructs an unmanaged RemotingService.
RemotingService(boolean enableManagement)
          Constructs a RemotingService with the indicated management.
 
Method Summary
 void addDestination(Destination destination)
          Casts the Destination into RemotingDestination and calls super.addDestination.
 Destination createDestination(String id)
          Creates a RemotingDestination 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 RemotingMessage 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 RemotingService.

See Also:
Constant Field Values
Constructor Detail

RemotingService

public RemotingService()
Constructs an unmanaged RemotingService.


RemotingService

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

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

createDestination

public Destination createDestination(String id)
Creates a RemotingDestination 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 RemotingDestination.
Returns:
The Destination instanced created.

addDestination

public void addDestination(Destination destination)
Casts the Destination into RemotingDestination 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 RemotingMessage by invoking the requested destination"s adapter.

Note that this method catches all Exceptions and throws only runtime MessageExceptions back to the MessageBroker as a best practice for the "MessageBroker to Service" contract.

Specified by:
serviceMessage in interface Service
Specified by:
serviceMessage in class AbstractService
Parameters:
msg - the RemotingMessage to process
Returns:
Object the result of the service message invocation.


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