Spring BlazeDS Integration

org.springframework.flex.core
Class AbstractServiceConfigProcessor

java.lang.Object
  extended by org.springframework.flex.core.AbstractServiceConfigProcessor
All Implemented Interfaces:
BeanFactoryAware, MessageBrokerConfigProcessor
Direct Known Subclasses:
MessageServiceConfigProcessor, RemotingServiceConfigProcessor

public abstract class AbstractServiceConfigProcessor
extends Object
implements MessageBrokerConfigProcessor, BeanFactoryAware

Base MessageBrokerConfigProcessor implementation for handling automatic Service registration with the MessageBroker

Author:
Jeremy Grelle

Nested Class Summary
protected static class AbstractServiceConfigProcessor.CustomSpringAdapter
          This is simply a marker to denote that a Spring-managed adapter will be injected at the proper initialization point.
 
Constructor Summary
AbstractServiceConfigProcessor()
           
 
Method Summary
protected abstract  void findDefaultChannel(MessageBroker broker, Service service)
          Find and set an appropriate default channel for the Service
protected abstract  String getServiceAdapterClassName()
          Returns the class name of the default ServiceAdapter for the Service
protected abstract  String getServiceAdapterId()
          Returns the default ServiceAdapter id for the Service
protected abstract  String getServiceClassName()
          Returns the class name of the specific Service implementation being configured
protected abstract  String getServiceId()
          Returns the default id for the Service being configured
 MessageBroker processAfterStartup(MessageBroker broker)
          Error checking is done on the started MessageBroker to ensure configuration was successful.
 MessageBroker processBeforeStartup(MessageBroker broker)
          The MessageBroker is checked to see if the Service has already been configured via the BlazeDS XML config.
 void setBeanFactory(BeanFactory beanFactory)
          
 void setDefaultAdapterId(String defaultAdapterId)
          Set the id for the default adapter to be installed in the Service.
 void setDefaultChannels(String[] defaultChannels)
          Set the ids of the default channels to be set on the Service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractServiceConfigProcessor

public AbstractServiceConfigProcessor()
Method Detail

processAfterStartup

public MessageBroker processAfterStartup(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 MessageBroker processBeforeStartup(MessageBroker broker)
The MessageBroker is checked to see if the Service has already been configured via the BlazeDS XML config. If no existing Service 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)

setBeanFactory

public void setBeanFactory(BeanFactory beanFactory)
                    throws BeansException

Specified by:
setBeanFactory in interface BeanFactoryAware
Throws:
BeansException

setDefaultAdapterId

public void setDefaultAdapterId(String defaultAdapterId)
Set the id for the default adapter to be installed in the Service.

Parameters:
defaultAdapterId - the id to set for the adapter

setDefaultChannels

public void setDefaultChannels(String[] defaultChannels)
Set the ids of the default channels to be set on the Service. 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 appropriate endpoint.

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

findDefaultChannel

protected abstract void findDefaultChannel(MessageBroker broker,
                                           Service service)
Find and set an appropriate default channel for the Service

Parameters:
broker - the MessageBroker that controls the Service
service - the service being configured

getServiceAdapterClassName

protected abstract String getServiceAdapterClassName()
Returns the class name of the default ServiceAdapter for the Service

Returns:
the default adapter class name

getServiceAdapterId

protected abstract String getServiceAdapterId()
Returns the default ServiceAdapter id for the Service

Returns:
the default adapter id

getServiceClassName

protected abstract String getServiceClassName()
Returns the class name of the specific Service implementation being configured

Returns:
the service class name

getServiceId

protected abstract String getServiceId()
Returns the default id for the Service being configured

Returns:
the default service id

Spring BlazeDS Integration

Copyright © 2011. All Rights Reserved.