org.springframework.webflow.definition.registry
Interface FlowDefinitionRegistryMBean

All Known Subinterfaces:
FlowDefinitionRegistry
All Known Implementing Classes:
FlowDefinitionRegistryImpl

public interface FlowDefinitionRegistryMBean

A management interface for managing flow definition registries at runtime. Provides the ability to query the size and state of the registry, as well as refresh registered flow definitions at runtime.

Flow registries that implement this interface may be exposed for management over the JMX protocol. The following is an example of using Spring's JMX MBeanExporter to export a flow registry to an MBeanServer:

     <!-- Creates the registry of flow definitions for this application -->
     <bean name="flowRegistry" class="org.springframework.webflow...XmlFlowRegistryFactoryBean">
         <property name="locations" value="/WEB-INF/flow1.xml"/>
     </bean>
  
     <!-- Automatically exports the created flowRegistry as an MBean -->
     <bean id="mbeanExporter" class="org.springframework.jmx.export.MBeanExporter">
         <property name="beans">
             <map>
                 <entry key="spring-webflow:name=flowRegistry" value-ref="flowRegistry"/>
             </map>
         </property>
         <property name="assembler">
             <bean class="org.springframework.jmx.export.assembler.InterfaceBasedMBeanInfoAssembler">
                 <property name="managedInterfaces"
                     value="org.springframework.webflow.definition.registry.FlowDefinitionRegistryMBean"/>
             </bean>
         </property>
     </bean>
 
With the above configuration, you may then use any JMX client (such as Sun's jConsole which ships with JDK 1.5) to refresh flow definitions at runtime.

Author:
Keith Donald

Method Summary
 boolean containsFlowDefinition(java.lang.String id)
          Queries this registry to determine if a specific flow is contained within it.
 int getFlowDefinitionCount()
          Return the number of flow definitions registered in this registry.
 java.lang.String[] getFlowDefinitionIds()
          Returns the ids of the flow definitions registered in this registry.
 void refresh()
          Refresh this flow definition registry, reloading all Flow definitions from their externalized representations.
 void refresh(java.lang.String flowDefinitionId)
          Refresh the Flow definition in this registry with the id provided, reloading it from it's externalized representation.
 

Method Detail

getFlowDefinitionIds

java.lang.String[] getFlowDefinitionIds()
Returns the ids of the flow definitions registered in this registry.

Returns:
the flow definition ids

getFlowDefinitionCount

int getFlowDefinitionCount()
Return the number of flow definitions registered in this registry.

Returns:
the flow definition count

containsFlowDefinition

boolean containsFlowDefinition(java.lang.String id)
Queries this registry to determine if a specific flow is contained within it.

Parameters:
id - the flow definition id
Returns:
true if a flow definition is contained in this registry with the id provided

refresh

void refresh()
             throws FlowDefinitionConstructionException
Refresh this flow definition registry, reloading all Flow definitions from their externalized representations.

Throws:
FlowDefinitionConstructionException

refresh

void refresh(java.lang.String flowDefinitionId)
             throws NoSuchFlowDefinitionException,
                    FlowDefinitionConstructionException
Refresh the Flow definition in this registry with the id provided, reloading it from it's externalized representation.

Parameters:
flowDefinitionId - the id of the flow definition to refresh
Throws:
NoSuchFlowDefinitionException - if a flow with the id provided is not stored in this registry
FlowDefinitionConstructionException


Copyright © 2004-2007. All Rights Reserved.