org.springframework.flex.messaging.remoting
Class RemotingServiceConfigProcessor

java.lang.Object
  extended by org.springframework.flex.messaging.remoting.RemotingServiceConfigProcessor
All Implemented Interfaces:
MessageBrokerConfigProcessor

public class RemotingServiceConfigProcessor
extends java.lang.Object
implements MessageBrokerConfigProcessor

MessageBrokerConfigProcessor implementation that installs a default RemotingService if one has not already been configured through the BlazeDS XML configuration.

Using this processor makes the traditional remoting-config.xml file in BlazeDS XML configuration unnecessary when exclusively using Spring to configure Flex remoting destinations.

This processor is installed automatically when using the message-broker tag in the xml namespace configuration. Its settings can be customized using the remoting-service child tag. See the XSD docs for more detail.

Author:
Jeremy Grelle

Constructor Summary
RemotingServiceConfigProcessor()
           
 
Method Summary
 flex.messaging.MessageBroker processAfterStartup(flex.messaging.MessageBroker broker)
          Error checking is done on the started MessageBroker to ensure configuration was successful.
 flex.messaging.MessageBroker processBeforeStartup(flex.messaging.MessageBroker broker)
          The MessageBroker is checked to see if the RemotingService has already been configured via the BlazeDS XML config.
 void setDefaultAdapterClass(java.lang.String defaultAdapterClass)
          Set the fully qualified class name for the default adapter class to be installed in the RemotingService.
 void setDefaultAdapterId(java.lang.String defaultAdapterId)
          Set the id for the default adapter to be installed in the RemotingService.
 void setDefaultChannels(java.lang.String[] defaultChannels)
          Set the ids of the default channels to be set on the RemotingService.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemotingServiceConfigProcessor

public RemotingServiceConfigProcessor()
Method Detail

setDefaultAdapterId

public void setDefaultAdapterId(java.lang.String defaultAdapterId)
Set the id for the default adapter to be installed in the RemotingService. Defaults to "java-object".

Parameters:
defaultAdapterId - the id to set for the adapter

setDefaultAdapterClass

public void setDefaultAdapterClass(java.lang.String defaultAdapterClass)
Set the fully qualified class name for the default adapter class to be installed in the RemotingService. Defaults to "flex.messaging.services.remoting.adapters.JavaAdapter".

Parameters:
defaultAdapterClass - the class of the default adapter

setDefaultChannels

public void setDefaultChannels(java.lang.String[] defaultChannels)
Set the ids of the default channels to be set on the RemotingService. If not set, the application-wide defaults will be used. If no application-wide defaults can be found, a best guess will be made using the first available channel with an AMFEndpoint.

Parameters:
defaultChannels - the ids of the default channels for the RemotingService

processAfterStartup

public flex.messaging.MessageBroker processAfterStartup(flex.messaging.MessageBroker broker)
Error checking is done on the started MessageBroker to ensure configuration was successful.

Specified by:
processAfterStartup in interface MessageBrokerConfigProcessor
Parameters:
broker - the started MessageBroker instance
Returns:
the modified MessageBroker
See Also:
MessageBrokerConfigProcessor.processAfterStartup(MessageBroker)

processBeforeStartup

public flex.messaging.MessageBroker processBeforeStartup(flex.messaging.MessageBroker broker)
The MessageBroker is checked to see if the RemotingService has already been configured via the BlazeDS XML config. If no existing RemotingService is found, one will be installed using the defined configuration properties of this class.

Specified by:
processBeforeStartup in interface MessageBrokerConfigProcessor
Parameters:
broker - the new MessageBroker instance
Returns:
the modified MessageBroker
See Also:
MessageBrokerConfigProcessor.processBeforeStartup(MessageBroker)