|
Spring BlazeDS Integration | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.flex.core.AbstractDestinationFactory
public abstract class AbstractDestinationFactory
Base class for BlazeDS destination factories.
Constructor Summary | |
---|---|
AbstractDestinationFactory()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
protected void |
configureAdapter(Destination destination)
Configure the service adapter for the destination. |
protected abstract Destination |
createDestination(String destinationId,
MessageBroker broker)
Create a specific destination and add it to the MessageBroker |
void |
destroy()
|
protected abstract void |
destroyDestination(String destinationId,
MessageBroker broker)
Stops and removes the specified destination from the MessageBroker |
protected BeanFactory |
getBeanFactory()
Expose the BeanFactory to subclasses |
protected String |
getDestinationId()
Returns the id for the destination created by this factory |
protected abstract Service |
getTargetService(MessageBroker broker)
Returns the target Service that will manage the destination |
protected abstract void |
initializeDestination(Destination destination)
Perform any necessary initialization logic on the created Destination |
void |
setBeanFactory(BeanFactory beanFactory)
|
void |
setBeanName(String name)
|
void |
setChannels(String[] channels)
Specify the BlazeDS channel ids (in order of preference) for communication with this destination |
void |
setDestinationId(String destinationId)
Specify the id for the destination |
void |
setMessageBroker(MessageBroker broker)
Set the MessageBroker where this destination will be created. |
void |
setServiceAdapter(String serviceAdapter)
Specify a custom service adapter id to be used by this destination |
void |
setServletConfig(javax.servlet.ServletConfig servletConfig)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractDestinationFactory()
Method Detail |
---|
public final void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface InitializingBean
Exception
public final void destroy() throws Exception
destroy
in interface DisposableBean
Exception
public void setBeanFactory(BeanFactory beanFactory) throws BeansException
setBeanFactory
in interface BeanFactoryAware
BeansException
public void setBeanName(String name)
setBeanName
in interface BeanNameAware
public void setChannels(String[] channels)
channels
- an array of BlazeDS channel idspublic void setDestinationId(String destinationId)
destinationId
- the id to setpublic void setMessageBroker(MessageBroker broker)
MessageBroker
where this destination will be created.
broker
- the message broker for this destinationpublic void setServiceAdapter(String serviceAdapter)
serviceAdapter
- the custom service adapter idpublic void setServletConfig(javax.servlet.ServletConfig servletConfig)
setServletConfig
in interface ServletConfigAware
protected void configureAdapter(Destination destination)
This implementation will first search the BeanFactory
for a bean with a matching id and use it if found.
Otherwise the normal createAdapter
method on the destination will be called.
May be overridden by subclasses that wish to specify custom adapter creation logic.
destination
- the destination being createdprotected abstract Destination createDestination(String destinationId, MessageBroker broker) throws Exception
MessageBroker
destinationId
- the id of the destination to createbroker
- the MessageBroker
where the destination should be created
Exception
- if the destination could not be created successfullyprotected abstract void destroyDestination(String destinationId, MessageBroker broker) throws Exception
MessageBroker
destinationId
- the id of the destination being destroyedbroker
- the MessageBroker
from which the destination must be removed
Exception
- if the destination could not be destroyed successfullyprotected BeanFactory getBeanFactory()
protected String getDestinationId()
protected abstract Service getTargetService(MessageBroker broker)
Service
that will manage the destination
broker
- the MessageBroker
that controls the service
protected abstract void initializeDestination(Destination destination) throws Exception
Destination
destination
- the created destination
Exception
- if initialization fails
|
Spring BlazeDS Integration | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |