Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Spring BlazeDS Integration
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.flex.remoting
Class RemotingDestinationExporter

    java.lang.Object
      org.springframework.flex.core.AbstractDestinationFactory
          org.springframework.flex.remoting.RemotingDestinationExporter

All Implemented Interfaces:
  FlexConfigurable, FlexFactory, BeanFactoryAware, BeanNameAware, DisposableBean, InitializingBean, ServletConfigAware

    public class RemotingDestinationExporter

extends AbstractDestinationFactory
implements FlexFactory

An factory for exposing a Spring-managed bean to a Flex client for direct remoting calls.

The exported service will be exposed to the Flex client as a BlazeDS remoting service destination. By default, the destination id will be the same as the bean name of this factory. This may be overridden using the serviceId property. Note that this convention is slightly different from that employed by the `remote-service` xml config tag. See the xsd docs for details.

The methods on the exported service that are exposed to the Flex client can be controlled using the includeMethods and excludeMethods properties.

Author:
  Jeremy Grelle, Mark Fisher
See Also:
  `MessageBrokerFactoryBean`

Field Summary

Fields inherited from interface flex.messaging.FlexFactory
`SCOPE, SCOPE_APPLICATION, SCOPE_REQUEST, SCOPE_SESSION, SOURCE`

Constructor Summary
`RemotingDestinationExporter()`

Method Summary
`protected Destination` | `createDestination(String destinationId, MessageBroker broker)` Create a specific destination and add it to the `MessageBroker`
`FactoryInstance` | `createFactoryInstance(String id, ConfigMap properties)`
`protected void` | `destroyDestination(String destinationId, MessageBroker broker)` Stops and removes the specified destination from the `MessageBroker`
`protected Service` | `getTargetService(MessageBroker broker)` Returns the target `Service` that will manage the destination
`void` | `initialize(String id, ConfigMap configMap)`
`protected void` | `initializeDestination(Destination destination)` Perform any necessary initialization logic on the created `Destination`
`Object` | `lookup(FactoryInstance instanceInfo)` Lookup will be handled directly by the created FactoryInstance
`void` | `setExcludeMethods(String[] excludeMethods)` Sets the methods to be excluded from the bean being exported
`void` | `setIncludeMethods(String[] includeMethods)` Sets the methods to included from the bean being exported
`void` | `setService(Object service)` Sets the bean being exported.

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

### RemotingDestinationExporter

    public RemotingDestinationExporter()

Method Detail

### createFactoryInstance

    public FactoryInstance createFactoryInstance(String id,
                                                 ConfigMap properties)

  Specified by:
    `createFactoryInstance` in interface `FlexFactory`

### initialize

    public void initialize(String id,
                           ConfigMap configMap)

  Specified by:
    `initialize` in interface `FlexConfigurable`

### lookup

    public Object lookup(FactoryInstance instanceInfo)

  Lookup will be handled directly by the created FactoryInstance

  Specified by:
    `lookup` in interface `FlexFactory`

### setExcludeMethods

    public void setExcludeMethods(String[] excludeMethods)

  Sets the methods to be excluded from the bean being exported

  Parameters:
    `excludeMethods` - the methods to exclude

### setIncludeMethods

    public void setIncludeMethods(String[] includeMethods)

  Sets the methods to included from the bean being exported

  Parameters:
    `includeMethods` - the methods to include

### setService

    public void setService(Object service)

  Sets the bean being exported. Supports setting either a direct bean instance reference, or the String identifier of the bean, to be looked up from the BeanFactory. The latter is preferred, as it allows more accurate calculation of the "source" property of the destination, required for tooling introspection of the destination.

  Parameters:
    `service` - the bean being exported

### createDestination

    protected Destination createDestination(String destinationId,
                                            MessageBroker broker)

  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

### 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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Spring BlazeDS Integration
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2011. All Rights Reserved.