Spring BlazeDS Integration

org.springframework.flex.messaging
Class MessageDestinationFactory

java.lang.Object
  extended by org.springframework.flex.core.AbstractDestinationFactory
      extended by org.springframework.flex.messaging.MessageDestinationFactory
All Implemented Interfaces:
BeanFactoryAware, BeanNameAware, DisposableBean, InitializingBean, ServletConfigAware

public class MessageDestinationFactory
extends AbstractDestinationFactory

A factory for Flex MessageDestinations that can be configured with a Spring-managed MessagingAdapter instance.

The destination will be exposed to the Flex client as a BlazeDS MessageDestination. By default, the id of the destination will be the same as the bean name of this factory. This may be overridden using the 'destinationId' property.

Author:
Mark Fisher, Jeremy Grelle
See Also:
MessageBrokerFactoryBean

Constructor Summary
MessageDestinationFactory()
          Creates a new MessageDestinationFactory
MessageDestinationFactory(ConfigMap properties)
          Creates a new MessageDestinationFactory with the specified properties ConfigMap
 
Method Summary
protected  Destination createDestination(String destinationId, MessageBroker broker)
          Create a specific destination and add it to the MessageBroker
protected  void destroyDestination(String destinationId, MessageBroker broker)
          Stops and removes the specified destination from the MessageBroker
 ConfigMap getProperties()
          Returns the properties ConfigMap for the destination
protected  Service getTargetService(MessageBroker broker)
          Returns the target Service that will manage the destination
protected  void initializeDestination(Destination destination)
          Perform any necessary initialization logic on the created Destination
 void setAllowSubtopics(String allow)
           
 void setClusterMessageRouting(String routingType)
           
 void setClusterRef(String clusterRef)
           
 void setDisallowWildcardSubtopics(String disallow)
           
 void setMessageTimeToLive(String timeToLive)
           
 void setSendSecurityConstraint(String constraint)
           
 void setSubscribeSecurityConstraint(String constraint)
           
 void setSubscriptionTimeoutMinutes(String timeout)
           
 void setSubtopicSeparator(String separator)
           
 void setThrottleInboundMaxFrequency(String maxFrequency)
           
 void setThrottleInboundPolicy(String policy)
           
 void setThrottleOutboundMaxFrequency(String maxFrequency)
           
 void setThrottleOutboundPolicy(String policy)
           
 
Methods inherited from class org.springframework.flex.core.AbstractDestinationFactory
afterPropertiesSet, configureAdapter, destroy, getBeanFactory, getDestinationId, setBeanFactory, setBeanName, setChannels, setDestinationId, setMessageBroker, setServiceAdapter, setServletConfig
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageDestinationFactory

public MessageDestinationFactory()
Creates a new MessageDestinationFactory


MessageDestinationFactory

public MessageDestinationFactory(ConfigMap properties)
Creates a new MessageDestinationFactory with the specified properties ConfigMap

Parameters:
properties - the properties map for the destination
Method Detail

getProperties

public ConfigMap getProperties()
Returns the properties ConfigMap for the destination

Returns:
the properties map

setAllowSubtopics

public void setAllowSubtopics(String allow)

setClusterMessageRouting

public void setClusterMessageRouting(String routingType)

setClusterRef

public void setClusterRef(String clusterRef)

setDisallowWildcardSubtopics

public void setDisallowWildcardSubtopics(String disallow)

setMessageTimeToLive

public void setMessageTimeToLive(String timeToLive)

setSendSecurityConstraint

public void setSendSecurityConstraint(String constraint)

setSubscribeSecurityConstraint

public void setSubscribeSecurityConstraint(String constraint)

setSubscriptionTimeoutMinutes

public void setSubscriptionTimeoutMinutes(String timeout)

setSubtopicSeparator

public void setSubtopicSeparator(String separator)

setThrottleInboundMaxFrequency

public void setThrottleInboundMaxFrequency(String maxFrequency)

setThrottleInboundPolicy

public void setThrottleInboundPolicy(String policy)

setThrottleOutboundMaxFrequency

public void setThrottleOutboundMaxFrequency(String maxFrequency)

setThrottleOutboundPolicy

public void setThrottleOutboundPolicy(String policy)

createDestination

protected Destination createDestination(String destinationId,
                                        MessageBroker broker)
                                 throws Exception
Create a specific destination and add it to the MessageBroker

Specified by:
createDestination in class AbstractDestinationFactory
Parameters:
destinationId - the id of the destination to create
broker - the MessageBroker where the destination should be created
Returns:
the created destination
Throws:
Exception - if the destination could not be created successfully

destroyDestination

protected void destroyDestination(String destinationId,
                                  MessageBroker broker)
Stops and removes the specified destination from the MessageBroker

Specified by:
destroyDestination in class AbstractDestinationFactory
Parameters:
destinationId - the id of the destination being destroyed
broker - the MessageBroker from which the destination must be removed

getTargetService

protected Service getTargetService(MessageBroker broker)
Returns the target Service that will manage the destination

Specified by:
getTargetService in class AbstractDestinationFactory
Parameters:
broker - the MessageBroker that controls the service
Returns:
the service

initializeDestination

protected void initializeDestination(Destination destination)
Perform any necessary initialization logic on the created Destination

Specified by:
initializeDestination in class AbstractDestinationFactory
Parameters:
destination - the created destination

Spring BlazeDS Integration

Copyright © 2011. All Rights Reserved.